South Korean and foreign airlines rerouted their flights away from North Korean airspace Friday after the North threatened passenger planes amid heightened tensions on the divided peninsula, officials said.

The move — which will cost carriers thousands of dollars for each flight — comes after North Korea warned in its state-run media that it cannot guarantee security for South Korean civilian airplanes flying near its airspace and accused the U.S. and South Korea of attempting to provoke a nuclear war with upcoming joint military drills.

It did not say what kind of danger South Korean planes would face or whether the threat meant the North would shoot down aircraft.

South Korea urged the North to retract the threat.

"The military threat against civil airplanes' normal flights is a violation of international norms and an inhumane act that cannot be justified under any circumstances," Unification Ministry spokesman Kim Ho-nyeon told reporters.

Kim hinted that the warning may be intended to clear the airspace before a possible missile test by North Korea, but declined to elaborate.

North Korea announced last week that it is preparing to send a communications satellite into space. Regional powers suspect it is actually planning to launch a long-range missile that is capable of reaching Alaska.

In Tokyo, the U.S. special envoy on North Korea, Stephen W. Bosworth, called the threat against South Korean planes "unacceptable." He also urged North Korea to refrain "from the provocation of firing a missile." He was to head to South Korea on Saturday.

The United Nations Command, the U.S.-led body overseeing the 1953 armistice that ended the three-year Korean War, called the North's threat "entirely inappropriate."

During a meeting Friday with North Korean generals, members of the command urged the North to retract the threat.

North Korea rejected the demand, saying it made the decision to ban South Korean planes from flying near its airspace as a "self-defense measure" to fend off U.S. military threats, according to the state-run Korean Central News Agency.

The North's chief delegate to the talks warned of "strong countermeasures" unless the United States calls off the joint military exercises with South Korea due to start Monday, KCNA said, without elaborating.

South Korea's two major airlines — Asiana Airlines and Korean Air, the world's largest international cargo carrier — said they would avoid North Korean airspace.

"We plan to make our flights detour through Japanese airspace until the crisis is resolved," said Park Hyun-soo, deputy general manager of Asiana Airlines' operations control center. He said rerouting planes would add about 40 minutes to flight times and cost about $2,500 per flight.

Air Canada and Singapore Airlines also rerouted flights to Seoul on Friday, an official at South Korea's Civil Aviation Safety Authority said. He spoke on condition of anonymity because he was not authorized to speak to the media.

South Koreans still vividly remember a North Korean bomb that exploded on a Korean Air flight in 1987, killing all 115 people on board, and a Korean Air plane that strayed into Soviet airspace in 1983 and was shot down by Soviet fighter jets, killing all 269 people aboard.

In Washington, State Department spokesman Gordon Duguid told reporters Friday that "North Korea's belligerent rhetoric is unwarranted and counterproductive."

"It's particularly unacceptable that they pose a threat to international civil aviation and global commerce with their most recent statements," he said.

The U.S. military said it would go ahead with the joint military drills involving 26,000 U.S. troops, an unspecified number of South Korean soldiers and a U.S. aircraft carrier. Both Washington and Seoul insist the annual exercises are purely defensive.