Lakers fans cheer after a made shot by Andre Ingram. (AP Photo/Mark J. Terrill)

The game meant little in the standings, considering the Rockets had already locked up the NBA’s best record and the host Lakers had long since fallen out of playoff contention. However, after more than a decade toiling away in basketball’s minor leagues, the contest meant everything to Andre Ingram — and he more than made the most of it.

With a Staples Center crowd cheering raucously at every made basket, and audibly grumbling when other Lakers declined to feed the ball to the fans’ new favorite player, the 32-year-old rookie scored 19 points in his first NBA game. Ingram made his first four shots, including three from three-point range, as an exuberant Kevin Harlan exclaimed to a national audience on TNT, “He’s a machine!”

This was already a heartwarming tale of perseverance far from the spotlight ultimately rewarded by the NBA’s most glamorous franchise. Then it took something of a startling turn Tuesday evening, when Ingram checked into the game and quickly proved deserving of a heat check. He ended up making six of eight shots, four of five from long range. That Los Angeles lost to Houston, 105-99, hardly seemed to matter.

“Very impressive,” the Rockets’ James Harden, a leading contender for NBA MVP honors, said of Ingram after the game. “He came out with confidence, he felt like he deserved to be here, made some big shots against us, got into a rhythm for his first NBA game. So, pretty cool story.”

Speaking about his outing with an admiring “NBA on TNT” panel, including Hall of Famers Charles Barkley and Shaquille O’Neal, Ingram said the atmosphere at the arena was “electric” and “just kept getting better.” He said that when he first came into the game, late in the first quarter, he was asked by teammate Kyle Kuzma if he was nervous and replied, “I think I’m okay.”

“It turned out well,” Ingram added, in a major understatement. Other NBA players — some of whom were in the game, such as Houston’s Chris Paul, and some who watched from afar — showered Ingram with praise during and after the game.

Ingram’s triumphant debut was a stark contrast with the scene, years ago, when his coach and confidant Jeff Jones tried to convince his beloved former player to head overseas.

It had been a few great years in the NBA development league. Ingram was on the way to becoming the leading scorer in the history of the (now defunct) Utah Flash. He was a leader in the locker room and a respected basketball talent around the world.

But NBA teams weren’t calling, and Ingram wasn’t getting any younger. The NBA dream might not happen, Jones tried to tell him. Why not go play overseas and make some real money?

“You get more NBA exposure in the [G] League — that’s why I chose it [instead] of going overseas,” Ingram told the Richmond Times-Dispatch in an interview in 2007. Ingram had said something similar to Jones, who coached the guard in college at American University.

“I might make more money in one month overseas than in five months here,” Ingram said. “The monetary incentive isn’t that great. … It’s all about the exposure.”

After a decade in the G League and a year in Australia, it wasn’t the exposure that landed Ingram an NBA contract at last, when the Lakers signed the Richmond native on Monday for the last two games of the regular season.

More likely, it was the simple drumbeat of persistence.

“Andre was seemingly determined to make the NBA,” said Jones, who now coaches at Old Dominion. “He liked the idea of that.”

“It couldn’t have happened to a finer person,” said George Lancaster, who coached Ingram at Highland Springs High just outside of Richmond. “It shows persistence, determination, core values. It represents what can happen to you when you have that call.”

Well, that, and a refined three-point shot.

Ingram shot 38.5 percent from three in college. His strength was attacking the rim and a solid midrange game, Jones said. He averaged 15.2 points and 4.8 rebounds his senior season at AU.

“He was our best player through the course of his career,” Jones said.

Former American University star Andre Ingram, 32, finally got his NBA shot. (American University)

But Ingram went undrafted by the NBA out of college and was selected in the seventh round of the G League draft, where he became one of the NBA’s best prospects to never get called up. He played 384 games in that developmental circuit, an entire career’s worth of trips to places like Sioux Falls and Des Moines.

And through those years in the development league, first with the Utah Flash then with the South Bay Lakers, Ingram steadily improved until his style suited an NBA game that includes more three-pointers, more fast breaks and less defense.

His last three years in the G League, Ingram shot better than 49 percent beyond the arc. His 47.5 percent clip this season was the best in the league.

The happy coincidence of the season’s end, his elevated play and injuries to some of the Lakers’ stars — guard Isaiah Thomas is out for the year, Lonzo Ball missed Tuesday’s game with a knee injury, and Kuzma was out with a bum ankle — finally delivered Ingram a chance a decade in the making.

“It was all the emotions you’d think,” Ingram said before Tuesday’s game. “It was joy, it was, I don’t know, vindication. It just felt great all the way around. It was a wonderful moment.”

If just getting signed was wonderful, immediately rewarding the Lakers’ faith was positively magical. Ingram, gray hair and all, wasted little time draining a long three-pointer as his teammates went wild on the bench.

Did he then, improbably, score 11 points in seven minutes? Did the Staples Center crowd chant “MVP” at him? Was he L.A.’s leading scorer at halftime? Yes, yes and yes.

The performance was made all the sweeter because Ingram’s wife, Marilee, and two young daughters were in attendance. He said after the game that when he signed with the Lakers on Monday, they made sure he called his wife right away but, as he put it, “I don’t know what she said, all I heard was screaming. She was overjoyed.”

Marilee Ingram found herself giving her own interview during Tuesday’s game, and as she was promising her husband “will give his best every time,” he hit yet another three-pointer. It was just that kind of night for Ingram, who became the oldest player to score at least 15 points in his NBA debut since at least the 1963-64 season.

TNT’s Kenny Smith asked the guard if he had ever reached a point when he felt resigned to abandoning his dream. Ingram replied, “My story is endurance, the full story of it is, but there were times, of course, that it didn’t seem like it would happen.

“I kept coming back because I genuinely felt I was close. … I was going to keep at it until I couldn’t, physically, or,” he added with a smile, “until my wife said come on home.”

Ingram had supplemented his G League salary with odd jobs like coaching prospects and tutoring math, he said earlier on Tuesday. He described his under-the-radar career as “a joy,” and said he has no plans to stop playing any time soon. After scorching the Rockets, why would he?

More from The Post:

‘It’s just wrong’: Patriots’ Robert Kraft visits rapper Meek Mill in prison

Bryce Harper is in line for the biggest contract in baseball history. Alex Rodriguez has been there.

Former Wizard Glen Rice Jr. kicked off Israeli team for punching teammate in the face

After a disastrous 2017, Mets look like they could give Nationals a fight in NL East

Patrick Reed wins the Masters, holding off Rickie Fowler and Jordan Spieth

What did Joe Paterno really know about the Sandusky scandal at Penn State?