North Korean Ambassador to Spain Kim Hyok Chol talks with the news media in Madrid in April 2017. The Spanish Foreign Ministry on Sept. 18, 2017, asked him to leave the country by the end of the month. (Angel Diaz/EPA-EFE)

Spain has given the North Korean ambassador assigned to Madrid until the end of September to leave, becoming the fourth country this month to expel Pyongyang's representative in the wake of the regime's sixth nuclear test.

The Spanish government, in announcing the move, follows similar steps by Mexico, Peru and Kuwait.

The expulsion will please Trump administration officials, who have been asking countries with diplomatic relations with North Korea to scale them back as a way to further isolate Kim Jong Un's regime. 

The United States has been leading efforts to punish the regime for its repeated missile launches this year, which Pyongyang says are part of an effort to develop an intercontinental ballistic missile aimed at reaching the U.S. mainland.

But these efforts have intensified following North Korea's huge nuclear test Sept. 3, which experts say appears to have been the detonation of a hydrogen bomb, as Pyongyang claimed, rather than the relatively smaller atomic bombs it had previously exploded.

The Spanish Foreign Ministry said it was expelling Kim Hyok Chol, who became North Korea's first ambassador to Spain when the country opened an embassy in Madrid at the beginning of 2014.

"Today, the North Korean ambassador was summoned and was told of the decision to consider him as a persona non grata, therefore he must stop working and abandon the country before 30 September," the Foreign Ministry said in a statement, according to the Reuters news agency. It also announced the move on Twitter. 

This month, just four days after the nuclear test, Mexico's Foreign Ministry said it had given the North Korean ambassador to that country, Kim Hyong Gil, 72 hours to leave the country.

"With this diplomatic step, Mexico expresses to the North Korean government its categorical repudiation of its recent nuclear activity, which is an increasingly brazen violation of international law and which poses a serious threat to the Asian region and to the world," the ministry said in a statement

North Korea is a growing threat to the world but particularly to key allies of Mexico such as Japan and South Korea, it said.

Before leaving, Kim Hyong Gil sharply criticized the decision.

"Mexico took an ignorant measure to declare an ambassador of a revolutionary regime from an independent country as persona non grata," he said in a statement to the Mexican news media, as reported by the specialist website NK News. "I condemned and totally rejected the U.N. Security Council's sanctions resolution as an infringement on our independence."

The Security Council approved the latest set of sanctions against North Korea on Sept. 11.

Peru also took extra steps to limit the North Korean presence in Lima. The Peruvian government had said in July that it would reduce the number of diplomats accredited there, in accordance with a U.N. Security Council resolution passed late last year.

That resolution, No. 2321, required member states to reduce the number of staff at North Korean diplomatic missions and consular posts, and to limit the number of bank accounts to one per diplomatic mission and one per diplomat.

During a trip to Latin America in August, Vice President Pence called on Chile, Brazil, Mexico and Peru to sever all diplomatic relations with North Korea.

The day after the latest nuclear test — the same day that the U.N. Security Council passed its latest resolution — the Peruvian government told North Korea's ambassador in Lima, Kim Hak Chol, he had five days to leave. He had been in Lima since the end of 2013.

These moves follow an announcement from Kuwait that it would expel the North Korean ambassador there, So Chang Sik, as part of a move to scale down Pyongyang's diplomatic presence in Kuwait City.

The Kuwaiti government had decided to reduce the number of diplomats accredited to the country from nine to four, it said in a notice to the United Nations dated Aug. 22 but not disclosed until last week. It said the ambassador would be among the diplomats whose accreditation was revoked.

Kuwait also said it would stop issuing visas to North Korean passport holders.

This is significant because Kuwait accepts North Korean laborers, who work as doctors or on construction sites earning money for the regime. This is another practice that Washington is actively trying to stop as part of its efforts to punish Pyongyang over its nuclear weapons program.