SEOUL—Mexico declared North Korea’s ambassador persona non grata and gave him 72 hours to leave the country, delivering a diplomatic blow to Pyongyang following its sixth and most powerful nuclear test.

“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,” Mexico’s Foreign Ministry said in a statement Thursday.

...