The Mexican government on Thursday said it had declared the North Korean ambassador to Mexico persona non grata in protest against the country's nuclear tests, an unusually firm step that moved it closely into line with Washington.
In a statement, the government said it had given Kim Hyong Gil 72 hours to leave Mexico in order to express its "absolute rejection" of North Korea's recent nuclear activity, describing it as a grave threat to the region and the world.
Mexico has traditionally sought to steer clear of diplomatic quarrels, but in the past few months it has adopted robust language to condemn the governments of Venezuela and North Korea as they descended into increasing international isolation.
Facing a rocky relationship with U.S. President Donald Trump because of his threats to tear up the North American Free Trade Agreement, Mexico has backed him diplomatically on issues that imply no great political cost for the government.
"North Korea's nuclear activity is a serious risk for international peace and security and represents a growing threat to nations in the region, including fundamental allies of Mexico like Japan and South Korea," the Mexican government said.
Mexico's step followed a tide of international condemnation of North Korea for repeated missile launches in recent weeks that intensified again following a nuclear test on Sunday.
An official at the Mexican Foreign Ministry noted, however, that President Enrique Pena Nieto's government was not breaking diplomatic ties with North Korea.