COMMERCE CITY — They tiptoed around some land mines. They played tug of war with teams in France, Mexico and Panama. And they waited for their prized player on a transhemisphere flight that finally landed Thursday afternoon — just before an international window came crashing shut.

But the Rapids, finally and officially, signed young striker Gabriel Torres to a contract late Thursday, ending a long and winding pursuit of the much-sought, up-and-coming star from Panama.

The Rapids’ acquisition of Torres, 24, is a permanent buy — not a loan — and on a multiyear designated player contract, according to club president Tim Hinchey. Torres becomes the Rapids’ first DP under the “Beckham Rule,” which allows Major League Soccer teams to sign as many as three players outside the salary cap.

“He’s a Rapids player. He’s ours. That’s important for us,” said Hinchey, who added that the transfer cost paid to San Francisco FC in Panama for Torres’ rights was a “sizable acquisition fee.”

“We think we got him for a good buy, based on some of the other teams bidding on him,” Hinchey said.

Torres’ pending transfer to Colorado leaked last month, just as he and the Panama national team played the U.S. in the Gold Cup final game in Chicago. Torres had torn through the tournament with five goals, including two in an upset of Mexico.

The Rapids pursued Torres while scouting him in Panama and adding him to their discovery list, according to Colorado technical director Paul Bravo.

“Once it’s all done, I’ll give you all the juicy details that have gone on from the moment we put Gaby on our discovery list, and even before that, when we were scouting,” Bravo said Wednesday.

Torres apparently agreed to join the Rapids when he met with them during the Gold Cup in Denver. But after he returned to Panama, his home club started shopping him around for higher bids, gaining interest from AJ Auxerre in France and another team in Mexico’s first division.

Then on Saturday, Torres’ teammate and former Rapids forward Roberto Brown said Torres would be going to Colorado, adding that he thinks Torres will eventually end up in the English Premier League.

Torres signed with the Rapids just a few hours before the international transfer window closed.

“It was worth the wait,” Hinchey said. “But I can tell you, this was one of the hardest, longest waits I’ve been through since I’ve been on the job.”

Torres will be expected to help push the Rapids in a jam-packed race for the MLS playoffs. Colorado, on a seven-game unbeaten run, is second in the Western Conference, three points behind Real Salt Lake — but only three points ahead of FC Dallas, which is out of the playoff picture.

“I’m looking for someone who can come in and help us and make an impact,” said Rapids coach Oscar Pareja. With Torres, the Rapids hope they have found their go-to scorer.

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