Florida East Coast Railway Holdings Corp., which traces its history to the Sunshine State’s pioneer days, said Tuesday it agreed to be sold to Mexican mining and rail conglomerate Grupo Mexico for $2.1 billion.

Grupo Mexico Transportes said it will acquire 100 percent of the company’s shares and assume its debt, pending approval of the deal by regulatory authorities. The transaction will be financed by $350 million in Grupo Mexico funds and $1.75 billion in debt.