A North Korean soldier defected by making a perilous midnight journey across the heavily fortified demilitarized zone into South Korea, defense officials in Seoul said Thursday, adding that they detained the man for questioning.

The man crossed into South Korea late on Wednesday and was spotted moving south along the Imjin River about 11:38 p.m., South Korea’s Joint Chiefs of Staff said.

“The man is an active-duty soldier, and he expressed his desire to defect to the South. Related procedures are underway,” a Joint Chiefs of Staff official said, according to South Korea’s semiofficial Yonhap news agency.

About 1,100 North Korean defectors arrived in South Korea last year, according to the South’s Unification Ministry.

It is relatively rare for North Koreans to attempt to cross directly to the South. Doing so involves traversing the demilitarized zone, a heavily defended strip of no man’s land running across the peninsula that is dotted with military guard posts, land mines, barbed wire and other barriers.

Most North Koreans who flee their country do so by crossing the northern border into China and traveling overland to Southeast Asia, where they are picked up by South Korean officials.

In 2017, a North Korean soldier was shot repeatedly by his comrades as he made a dramatic escape to South Korea at the Joint Security Area, the only place on the frontier where North and South Korean forces come face to face. The last time a North Korean soldier defected via the DMZ was late last year.

Oh Eun-jeong, 26, left her home in Kyongsong on the Northeastern tip of the Korean peninsula in 2009 to find her mother in the South. (Erin Patrick O'Connor, Nils Clauss/The Washington Post)

This week’s incident comes amid renewed tensions between North and South Korea. North Korea has carried out at least two weapons tests in the past week, as Pyongyang expresses anger at plans by the United States and South Korea to hold joint military exercises this month.

North Korean Leader Kim Jong Un also unveiled a new submarine recently that defense analysts said could be equipped to carry nuclear-capable ballistic missiles.

The developments have cast doubts over a June 30 agreement between Kim and President Trump to renew working-level talks on denuclearization. North Korea wants the United States to ease sanctions, but a summit between the two sides in February ended with no agreement. Washington said Kim was not willing to go far enough on nuclear disarmament.

The Trump administration has played down the latest North Korean saber-rattling. National security adviser John Bolton told Fox Business Network on Wednesday that the recent weapons tests do not violate Kim’s pledge not to carry out launches of intercontinental ballistic missiles — the longest-range weapons, theoretically capable of hitting the United States.

North and South Korea have remained in a technical state of war since 1953, when the Korean War ended with an armistice rather than a peace agreement.