The MLS transfer window may have closed last week, but that didn’t stop Orlando City from completing a final bit of business on Thursday morning.

The Lions announced the acquisition of defender Carlos Ascues on loan from Peruvian club FBC Melgar on Thursday, over a week after the MLS deadline for acquiring players via loan or transfer. The move, which club GM Niki Budalic told MLSsoccer.com was completed using Targeted Allocation Money, immediately raised a big question: How did Orlando finish the deal after the window closed?

To make a long story short, the club received an exception from FIFA, the US Soccer Federation and MLS to make the move outside of the transfer window.

How they arrived at that point is, as you’d expect, a bit more involved.

According to Budalic, the Lions began scouting and recruiting Ascues in the spring. The club put those efforts on hold after they dismissed former head coach Jason Kreis and replaced him with James O’Connor in June, but, after a month with O’Connor at the helm, decided to restart their pursuit of Ascues during the secondary transfer window.

Orlando cleared cap space and collected $750,000 in Targeted Allocation Money by trading Justin Meram to Columbus Crew SC to create room to add Ascues, then got to work on a deal. A framework was eventually hammered out, with Orlando agreeing to send what Budalic called a “small” loan fee to Melgar, who would recall Ascues from his loan to fellow Peruvian club Alianza Lima and subsequently loan him back out to the Lions. Things were so far along that Orlando arranged to fly Ascues from Lima to Florida last Thursday, but a paperwork snafu put those plans on hold.

The clubs filled out nearly all the relevant forms in FIFA’s online tool for completing transfers and loans, but a bank account number was mistakenly left out. Without the account information, the move couldn’t be finalized in FIFA’s program. When the transfer deadline passed before the bank number could be entered, the deal, at least at the moment, was dead.

“It was panic,” Budalic told MLSsoccer.com with a laugh when asked to describe his emotions when he learned of the error. “At that point, you just start to rely on MLS to coordinate with the USSF and the contacts we have at the club at Melgar and try to work through it. At that point, really, it’s out of our hands.”

The case eventually moved to U.S. Soccer, who moved the deal into FIFA’s appeals process. The facts were then presented and, thanks to the agreement being in place and the good faith efforts on the part of both clubs to complete the deal before the close of the window, the loan was approved. Budalic and Orlando learned of the positive ruling on Wednesday, bringing a happy ending to an emotional process during an already taxing time for the struggling Lions.

“It’s just difficult. You do a lot of work to completing a transfer and the prospect of it not going through, it’s obviously frustrating and uncomfortable,” said Budalic. “You know you did all you could to do it and it’s just a matter of an administrative error that can potentially cancel the transfer, so it was difficult, but you try to be rational and patient and keep emotion out of it and just wait for the process to play out.”

Ascues’ loan is for the remainder of the season and Orlando has an option to extend it through the 2019 campaign. Budalic said that the club is using TAM on the 26-year old for the remainder of this year and will continue to do so if they exercise their option to bring him back next season.

Though he’s capable of playing as a holding midfielder, Ascues will primarily serve as a new option at center back for the Lions. Orlando’s defense has struggled with injuries all season and have given up a league-worst 57 goals, eight more than any other team in the league.

Budalic also thinks the Peruvian international, who received a recommendation from Orlando midfielder and countryman Yoshi Yotun, is coming with Orlando with something to prove.

“What we like about him is he brings an athleticism to our backline. I think the ability to be composed and the ability to play out of the back, the combination of those three factors were very important for us,” Budalic said. “I think James has shown that he likes players with tactical flexibility, so the ability to play multiple positions, the ability to play multiple formations is a priority for him, so he ticked a lot of boxes with regards to that.”

“This is a player that has a very high ceiling,” he added later. “He was a regular with Peru and we’re finding a player that is now hungry to prove himself outside of Peru and to get back into the national team, to be a regular.”