(CNN) A 32-year-old man from El Salvador died Thursday morning in US custody, hours after being apprehended by Border Patrol agents, US Customs and Border Protection said.

The man, who was not named, was taken into custody by agents from the El Paso Station late Wednesday evening and was being processed at the Lordsburg Border Patrol Station, more than two hours away in New Mexico, "when he fell into medical distress," CBP said in a statement.

Attempts to revive the man were unsuccessful, CBP said.

"Our condolences are with his family," the agency said.

The El Salvadoran man's death comes amid a growing number of migrants who recently died in US custody. At least 12 others have died since September as the number of Central Americans making the arduous journey to the southern US border has surged.

Read More