A plane on its way to Miami International Airport from Costa Rica Thursday had to make an emergency landing after the pilot reported smoke on board.

American Airlines JFKAmerican Airlines flight 1204, which departed Costa Rica around 11 a.m., was diverted from it’s route to MIA, landing safely at the Gustavo Rojas Pinilla International Airport in San Andres, Colombia, according to the Federal Aviation Administration.

San Andrés (island) is a coral island among the Colombian islands in the Caribbean Sea, about 230 km (140 miles ) from the coast of Nicaragua and north-eastern Costa Rica, and 750 km (470 miles) northwest of the coast of Colombia.

The airline said a “mechanical issue” was behind the pilot’s decision to divert the flight to the island, located on Colombia’s north coast.

Caracol TV reported that the aircraft’s captain, a Boeing 757, reported smoke in the cockpit as well as the cabin—which caused the diversion.

No one was injured, Caracol reported.