Hours after suffering a devastating knee injury at Madison Square Garden last year, former Knicks star Kristaps Porzingis came home and allegedly raped a neighbor he had invited to his luxury Manhattan penthouse, the woman told police, according to law-enforcement sources.

The woman made her stunning allegation against the 23-year-old player on Thursday afternoon — and investigators consider her credible, one high-ranking NYPD source told The Post.

The accuser is “believable,” the source said, even though she did not report the alleged attack until more than a year later and has admitted to cops that she discussed getting $68,000 in hush money from the multimillionaire basketballer.

Porzingis, who now plays for the Dallas Mavericks, is denying the allegation — and the FBI is investigating “the accuser’s extortionate demands,” the player’s lawyer said in a statement Saturday night.

The alleged attack happened Feb. 7, 2018, at the soaring Sky building in Midtown West, the woman told cops after walking into the 10th Precinct station house, the sources told The Post.

The woman — who is in her 20s and also lived in the building — told cops the NBA star visited her apartment at around 2 a.m. and that she accepted his invitation to go back to his posh pad.

Once inside, the towering, 7-foot-3 Latvian allegedly held her down and raped her, she told cops, according to sources.

The NYPD’s Special Victims Division has taken over the case, the sources said. Porzingis had not been charged as of Saturday night.

The woman told cops she waited more than a year to talk to police because the player allegedly promised to give her money to keep her quiet, the sources said. She told cops he promised to give her $68,000 to pay for her brother’s college tuition — but then reneged, the sources said.

It is unclear if any money ever changed hands between the two.

Porzingis denies the allegation “unequivocally,” said his lawyer, Roland G. Riopelle.

“We made a formal referral to federal law enforcement on December 20th, 2018, based on the accuser’s extortionate demands,” he said.

“We also alerted the National Basketball Association months ago and they are aware of the ongoing investigation of the accuser by federal law enforcement. We cannot comment further on an ongoing federal investigation,” Riopelle said.

“We have been instructed by federal authorities not to comment,” Mavericks owner Mark Cuban told The Post in an e-mail, which he CC’d to NBA officials and Porzingis’ reps.

Hours before the alleged attack, the then-Knicks forward tore the anterior cruciate ligament in his left knee during a 103-89 trouncing by the Milwaukee Bucks at the Garden.

When Porzingis returned home from his ACL-tear diagnosis, he joined his two brothers and longtime physiotherapist, Manolo Valdivieso, in downing at least one shot of tequila, according to a 23-minute documentary about his rehab.

“I think that night we got back home, we made four shots,’’ his brother and agent Janis Porzingis said.

“I just said: ‘To a new beginning.’ ” We drink the shot and started the next day as a new beginning. That’s what we did.”

“The shock moment. I would say lasted for a day and half,’’ Janis added.

“When you know those things happen, you never think it’s going to happen to him. It’s a shock. You can’t believe that’s happening actually.”

Porzingis was traded to Dallas on Jan. 31. The Mavericks were in Miami on Thursday; they play again at 3:30 p.m. Sunday in Oklahoma City.

Asked if they’d been made aware of the rape allegation, a Knicks spokesman said: “This is Kristaps’ personal matter and not related to the Knicks.”

But the Knicks had indeed given the Mavericks advance notice of the pending rape allegation before the trade, ESPN’s Adrian Wojnarowski tweeted on Saturday night.

“The league office had been previously made aware of the allegations,” he added of the NBA.

NBA spokesman Mike Bass confirmed to The Post, “We are aware of the situation.”

Porzingis, selected fourth by the Knicks in the first round of the 2015 draft, was dubbed the “Unicorn” by ex-Thunder forward Kevin Durant.

“He can shoot, he can make the right plays, he can defend, he’s a 7-footer that can shoot all the way out to the 3-point line,” Durant said in 2016.

“That’s rare. And block shots — that’s like a unicorn in this league.

Additional reporting by Marc Berman and Laura Italiano