YANGON, Myanmar - Myanmar and North Korea, two of Asia's most repressive regimes, signed an agreement yesterday to resume diplomatic ties during a visit to Myanmar by the North Korean vice foreign minister, an official said.

Myanmar severed diplomatic relations with North Korea in 1983, after a fatal bombing attributed to North Korean commandos during a visit to Yangon by former South Korean President Chun Doo Hwan.

The two countries have been quietly working the last few years to normalize relations. Their governments routinely meet at regional meetings, and Myanmar has reportedly bought weapons from North Korea.

Myanmar's deputy foreign minister, Kyaw Thu, said the agreement to restore ties was signed yesterday morning on the second day of the three-day visit by North Korean Vice Foreign Minister Kim Yong Il, whose trip had been cloaked in secrecy.

It is now up to Pyongyang whether it will open diplomatic offices in Myanmar, Kyaw Thu said.

Both Myanmar and North Korea have been widely criticized for their authoritarian governments, with Myanmar's drawing censure especially for its detention of political opponents, including Nobel Peace Prize winner Aung San Suu Kyi.

North Korea has drawn international condemnation for refusing to abandon its nuclear-weapons program.

In 2005, Secretary of State Condoleezza Rice listed Myanmar and North Korea as among six countries that were "outposts of tyranny."

The South Korean president was unhurt in the 1983 bombing, but 21 people were killed, including four South Korean cabinet ministers.

Three North Korean commandos involved in the bombing were detained. One was hanged, a second blew himself up during his arrest, and a third remains in prison.