After a messy ordeal to negotiate the release of its coach, the Colorado Rapids on Friday finally announced that Oscar Pareja has left the team to be head coach at FC Dallas, his former club.

Pareja — who suddenly resigned in late December — leaves after two years in charge of the Rapids.

He previously was a player and assistant coach for 14 seasons with Dallas. Colorado hired him just more than two years ago, on Jan. 5, 2012, to spearhead a rebuilding project in Commerce City.

Over the past several days, the Rapids were forced to negotiate a contract buyout between the team and Pareja, and then, separately, an agreement for compensation from Dallas. Pareja was signed through the 2015 season with Colorado, so Dallas had to buy out his contract.

MLS is not investigating tampering charges with Dallas, a league spokesman told The Denver Post. It appears the two teams instead worked out a deal.

The Rapids will receive Dallas’ second first-round pick in 2015 and allocation money for Pareja. Separately, Dallas will pay the Rapids for taking Pareja. The total allocation money and buyout was not made available by the Rapids.

Pareja compiled a record of 25-31 and 13 draws with the Rapids over two seasons and one playoff appearance (a 2-0 loss to Seattle in the first round in November). He helped oversee a complete rebuilding of the team two years after the Rapids won the MLS Cup.

In Pareja’s tenure, the Rapids signed their first designated player (Gabriel Torres), drafted two rookie of the year candidates (Dillon Powers and Deshorn Brown) and moved into the starting lineup two recent U.S. national team call-ups (Shane O’Neill and Chris Klute).

Pareja in early November, after rumors surfaced that he was a candidate for the Dallas job, said that he had not talked to them and would not in the future.

“I have not talked about it,” Pareja said then. “I signed for something and I’m working under that. And it is what it is.”

But, he added, the life of a coach is always on standby.

“As coaches, for good or bad, you always have your luggage at the front door, just in case you want to kick it in or kick it out,” Pareja said in November. “And that’s life. So we’ll see. It’s better to be wanted to be sure.”

After the end of the MLS season, Pareja met with the Rapids’ front office to talk about the team’s plans for next season. In those meetings, Pareja did not mention wanting to leave. Then in mid to late December, Pareja had a change of heart. The pull to his former club was too strong — Pareja still owns a house near FC Dallas’ home stadium.

Colorado now is forced to find another new coach and an assistant coaching staff less than a week before the MLS draft. Pareja’s top assistant, Wilmer Cabrera, this week was hired as head coach at Chivas USA. He likely will take another Rapids assistant, Paul Caffrey, with him to Los Angeles.

The Rapids travel to face Dallas for the first time this season on June 7. The teams also play October 18 in Colorado on national TV.

The Rapids on Friday also announced the hiring of former longtime player Pablo Mastroeni as an assistant to technical director Paul Bravo. Mastroeni will likely not be considered as a candidate to replace Pareja.

But Colorado likely will try to find a coach with Colorado ties. That could mean New York Red Bulls assistant Robin Fraser, a former player for the Rapids and the Colorado Foxes of the pre-MLS American Professional Soccer League.

But Red Bulls coach Mike Petke this week said that he has not been contacted asking for permission to interview Fraser. And Fraser on Friday was with Petke at the MLS pre-draft combine.

Another Colorado-connected name that may be considered is former Portland Timbers coach John Spencer, who was a much-loved player for the Rapids.

But although Fraser and Spencer might form an early list of potential hires, they will not be the only two — and the Rapids will not rush to find a replacement, a source told The Denver Post, who at the time was not authorized to speak publicly because the Pareja deal had not been finalized. It’s possible the Rapids will begin their preseason without a head coach.

In their 18-year history, the Rapids’ average coaching tenure is two and a half seasons. Glenn “Mooch” Myernick (1997-2000) and Tim Hankinson (2001-05) each lasted the longest, going four years.

Nick Groke: 303-954-1015, ngroke@denverpost.com or twitter.com/nickgroke