A federal judge has issued a ruling supporting a nearly $2.5 billion bid by Grupo Mexico , the country's largest mining company, for Asarco LLC, paving the way for the U.S. copper miner to exit bankruptcy.

Judge Andrew Hanen of the U.S. District Court in Brownsville, Texas, said in a decision issued late on Friday that Grupo's plan was feasible and more likely to close than a sale of Asarco to India's Sterlite Industries Ltd.

This case is now in its fifth year of bankruptcy proceedings. While the path has not necessarily been as expedient or as unerring as some would have preferred, it has led all concerned to a point where the end, barring appeals, is now in sight, Hanen wrote in a 141-page page ruling.

In many ways, the course of this bankruptcy has been a contentious and hard-fought piece of litigation, he added. In other ways, this proceeding can be labeled as one of the most successful bankruptcy proceedings in recent history.

Asarco, based in Tucson, Arizona, filed for bankruptcy protection in 2005 amid a strike and more than $1 billion of asbestos and environmental claims. The miner and its union had favored a $2.565 billion bid by India's Sterlite.

However, U.S. Bankruptcy Judge Richard Schmidt in Corpus Christi, Texas had twice recommended the Texas district court approve Grupo Mexico SAB de CV's $2.4799 billion bid.

The district court is deciding the final winner due to certain agreements related to the company's asbestos liabilities.

Grupo Mexico acquired Asarco in a leveraged buyout in 1999, but lacks board control due to the bankruptcy. Grupo Mexico had argued it still owned Asarco's equity and could not be forced to sell the assets.

An attorney for Grupo previously said if the judge ruled in favor of Grupo, the company would be required to close the deal in 30 days and Asarco could be out of bankruptcy by December 31.

On Friday Hanen said it was unlikely that Asarco's unionized workers would go on strike, a day after Grupo said the reorganized Asarco would assume the union's existing contract once its plan is confirmed.

Sterlite had made numerous attempts to sweeten its offer for Asarco. As part of its latest offer it said it would let Grupo Mexico out of an $8 billion potential legal liability stemming from the 2003 transfer of Asarco's stake in Peruvian miner Southern Copper Corp . But Judge Schmidt had said that offer was too late.

The cases are In re: Asarco LLC, U.S. Bankruptcy Court, Southern District of Texas, No. 05-21207 and In re: Asarco LLC, U.S. District Court, Southern District of Texas, No. 09-00177.

(Reporting by Ben Klayman; Editing by Xavier Briand)