Star free agent Carlos Correa is back in serious talks with the Twins after Correa and the Mets have been struggling for nearly three weeks to complete a deal. As of late Monday night it appeared the Twins’ talks with Correa were gaining steam. The way things were going, the Twins appeared to have a decent chance to retain the star shortstop they — along with most everyone else — had thought was surely gone to the Mets.

The Twins have been on the periphery the past two-plus weeks waiting to see if there was an opening after Correa’s old ankle injury was flagged in the Mets’ physical a couple days before Christmas. But now the Twins’ talks with Correa’s camp appeared to be gaining momentum.

The Mets and Correa had agreed to a $315 million, 12-year deal in the wee hours of Dec. 21, but have been having trouble finishing the deal as the sides have been haggling over language to protect the team in case Correa re-injures the ankle he needed surgically repaired while a minor leaguer in 2014. While Correa’s agent Scott Boras agreed to new language in past deals when physicals raised questions, including previous contracts for J.D. Martinez, J.D. Drew and Ivan Rodriguez, Boras and the Mets are having a more difficult time finding common ground.

Carlos Correa is now in serious talks with the Twins.

The Twins, meanwhile, have retained interest in the player they had signed a year ago to a record $105.3 million, three-year deal, with two opt-outs. Twins doctors saw Correa at season’s end, and they know the player better than most as he spent 2022 with the team before opting out and triggering one of the most interesting free-agent dramas ever. The Twins were believed in for a 10-year deal worth about $280M at one point this winter.

Correa originally agreed to a $350M, 13-year deal with the Giants, but after the Giants flagged his physical with them over the same ankle issue and called off a press conference to announce the signing, Correa’s camp quickly made a deal with the Mets. The interesting thing is that Correa has not missed one day due to the ankle issue as a major leaguer, and Boras said he hasn’t even received treatment in that area.

Two days after Boras and Mets owner Steve Cohen agreed to their $315M deal, the Mets raised the same issue in Correa’s physical with them. There still has been strong hope they would finalize a deal for two-plus weeks. Cohen expressed excitement upon agreeing to the Correa deal while vacationing in Hawaii in the wee hours of Dec. 21, telling The Post, “We needed one more thing, and this is it.”

Steve Cohen, left, at a Citi Field fan event on Saturday.

Cohen recently told a Mets YouTuber, Tyler Ward, he expected a resolution soon, one way or another, and it appears that will be the case — though it may not turn out the way most expected. The Post reported on Friday that at least another team or two was in contact with the Correa camp, as it appeared the Mets were having trouble finishing the deal.

The sides continued to talk, and there’s been a lot of conversation about language and guarantee, but Correa’s camp and the Mets were still struggling to figure it out as of Monday night. Boras sought similar language to what he agreed to in the previous deals for Martinez, Drew and Rodriguez, but the Mets’ concerns apparently ran deep based on a reading of the MRI exam.

That’s what gave the opening to the Twins, who are trying to close their own deal now.