PANAMA CITY (AP) — Panama says it has closed its border with Colombia over concerns about the spread of COVID-19, but it wasn't clear how it would enforce such a measure in the dense jungle-shrouded Darien region where smugglers operate and thousands of migrants have crossed this year on their journey north.

The move came after Panamanian officials said Colombia had decided to open its border.

“For Panama, that measure puts at the risk the significant advances achieved for all Panamanians to control the COVID-19 pandemic, as well as the border security and control of migrant flows,” Panama’s Foreign Relations Ministry said in a statement late Wednesday.

The two countries share a 165-mile (266 kilometer) border. Panama had reopened its borders early this year, which had increased the flow of migrants into the country.

A request for information about how the border would be controlled was not immediately answered Thursday by Security Minister Juan Pino.

Several thousand migrants, mostly from Haiti, remain in camps in Panama near the Colombian border.