The Red Bulls’ pursuit of Alejandro Romero Gamarra was as lengthy as it was pricy, and had more twists, turns and melodrama than a telenovela. But now that it’s finally over, sporting director Denis Hamlett is convinced it all will be worth it.

In the end, the Red Bulls spent two months chasing the midfielder known as Kaku, paying Argentina’s Huracan a club-record transfer fee of $6.25 million for 80 percent of his rights.

“We spent 58, 59 days on this process,” Hamlett told The Post. “We got the guy we wanted, and [Huracan], us and the player are all happy. It was a lengthy process. Any time you think about transfers there are always twists and turns, and things come up. We stayed strong, and that’s why were able to get to this stage.”

But this one took a little more patience than usual.

Atlanta United already had a discovery claim on Kaku, 23, which actually bodes well since their manager Gerardo “Tata” Martino coached Argentina to consecutive Copa America finals and is intimately familiar with the country’s top prospects.

The Red Bulls paid Atlanta $50,000 in general allocation money for Kaku’s discovery rights. But after agreeing to a transfer fee that nearly tripled the then-club record $2.2 million they paid for Gonzalo Veron — Huracan even announcing the move on Christmas Day — news came out a week later that Kaku’s fired ex-agent Marcelo Simonian threatened to hold up the deal if he didn’t get a huge cut.

It took three more nervous weeks before Kaku and Huracan finally paid Simonian $700,000 to settle the infighting. There were even reports the Red Bulls sent an ultimatum that they would kill the deal if Simonian didn’t commit in writing not to initiate legal action when the sale went through. But Hamlett denied it.

“That’s news to me. That’s the first I’ve heard that,” Hamlett said. “Lots of things were flying around through this whole process. That’s what makes [the] transfer window exciting, keeps them intriguing.

“That our fan base was following this speaks volumes where the league is growing. It adds to it, makes things exciting. Look around the world, that’s what people are talking about. It shows the fan base, what they want to know, what teams are doing. It makes MLS [relevant], puts MLS on a new platform. It’s great for our league.”

Kaku is the Red Bulls’ first Young Designated Player, so he will count just $200,000 against the salary cap instead of $480,000. He will be handed the No. 10 jersey and outsized expectations. It’s unclear if he will play on the left, right or central midfield, or be ready for the Feb. 22 CONCACAF Champions League opener against Olimpia.

“When we watched him extensively he’s shown ability to play as a 10 [an attacking center midfielder],” Hamlett said. “With his former coach that’s where he had huge success. Most recently they played him out left or right in a three-man system. He’s got flexibility to play any of front three. The part that really stood out most was his ability against the ball.

“When you think of 10s and wide guys, you don’t really see that. Then you see the positives with the ball, ability to change the game and make special plays. Here’s a guy, Red Bull DNA, he has it in him, good instincts, a magical left foot. It’s a combination of all the boxes being ticked. We’re just excited we have a talented player who can change the game.”