NEW ORLEANS — After getting married to his high-school sweetheart from Baton Rouge, La., on June 25, Langston Galloway got a phone call the next day from Jeff Hornacek.

The Knicks’ new coach said he wanted to re-sign Galloway, thinking he would fit in well with the team’s vision of a high-speed attack. At the time, Galloway didn’t know the Pelicans would come after him hard during free agency.

“I didn’t think I would leave,’’ Galloway told The Post this week. “But I had an opportunity to go home. That definitely was big, important for me and my family and wife. It’s definitely been great playing back home, loving the atmosphere New Orleans has.’’

The Pelicans also offered Galloway money the Knicks didn’t anticipate — a two-year, $10 million contract. Even if the Knicks matched, Galloway was headed home after spending two revelatory seasons as a Knicks combo guard, partially because his new wife, Sabrina, is a true-blue Louisiana girl.

Galloway is flourishing as the Pelicans’ sixth man, averaging 9.9 points per game. He ranks second in the NBA in fourth-quarter 3-point shooting at 55.4 percent.

“The attraction was he was a local kid, and I did a lot of research and he’s such a professional kid,’’ Pelicans coach Alvin Gentry told The Post. “We thought he can make shots. Anyone who can make shots creates space for [Anthony Davis]. That’s what we needed more than anything. That fourth-quarter stat tells me he’s not afraid of the moment and he comes through with it.”

The Pelicans, winners of four of five heading into Friday night’s game versus the Knicks, are suddenly in a playoff race.

“They definitely made the effort,” Galloway said of the Knicks. “Jeff said after the wedding, whatever happens, he’s definitely excited if I came back, but wished me luck if I decided not to.’’

The undrafted Galloway was a find of Clarence Gaines, Phil Jackson’s chief advisor. Galloway attended Knicks’ training camp in 2014, was cut, joined the D-League Westchester Knicks and was signed in January of that season. He became the brightest bright spot of that 17-65 campaign, earning Second Team All-Rookie honors, and was a mainstay on last season’s improved 32-50 squad.

“I enjoyed every step of the way in New York,’’ the former Saint Joseph’s guard said. “We struggled here and there. I think the main thing was building an organization from ground up. They’re doing great this year. It was a slow process, but it’s taking off now.”

Galloway said he feels the same about the Pelicans, who have Davis and, when healthy, one of the league’s top point-guard talents in Jrue Holiday. The Pelicans are two games out of the eighth seed in the West despite a 13-21 record.

“Our team is definitely coming together,’’ Galloway said. “We got a lot of firepower. Guys hurting are coming back. We’re definitely a team to be reckoned with.”