The launch appeared to be the first to cross over Japan since 2009 and comes amid ongoing annual military drill being carried out between the United States and its close ally in the region, South Korea.
South Korea's joint chiefs of staff said the missile travelled about 2,700km and reached a maximum height of 550km as it flew over the northern Japanese island of Hokkaido and landed in the sea.
The projectile was launched from the Sunan region near the North Korean capital, Pyongyang, just before 6am local time on Tuesday (21:00 GMT on Monday), the South Korean military said.
Japanese public broadcaster NHK reported that the missile flew over the northernmost main island of Hokkaido and broke into three pieces and fell into the waters 1,180km east of Cape Erimo.
The test appeared to have been of a recently developed intermediate-range Hwasong-12 missile, experts said. It is the same sort of missile that North Korean threatened to fire on the US territory of Guam.
The Japanese government's J-Alert warning system advised people in northern Japan to take precautions, but NHK said there was no sign of damage.
Japan's military did not attempt to shoot down the missile, which passed over Japanese territory at about 6:06am local time (21:06 GMT).
There was no immediate comment from North Korea.
|The missile fell into the waters 1,180km east of Cape Erimo|
Shinzo Abe, Japan's prime minister, said the missile launch over its territory was an "unprecedented, serious and grave threat".
"Their outrageous act of firing a missile over our country is an unprecedented, serious and grave threat and greatly damages the regional peace and security," he said.
In a 40-minute telephone call with US President Donald Trump, he said, the two allies had agreed to "further strengthen pressure against North Korea".
Abe said he would also call for an urgent meeting at the UN to discuss further action, strongly demanding stepped up pressure against the reclusive neighbour.
Al Jazeera's Wayne Hay, reporting from Seoul, said that although there have been several recent missile launches by North Korea, and there are often launches this time of year due to military exercises between the US and its allies in the region, a missile passing over the Japanese mainland will be seen as a bigger provocation.
"So this will certainly be viewed by Japan, the United States and South Korea as an uptick in the seriousness of the missile launches coming from North Korea," he said.
North Korea typically reacts with anger to US-South Korean military drills, which are happening now, often staging weapons tests and issuing threats to the two countries via its state-controlled media.
Michael Penn, president of the Shingetsu news agency in Tokyo, told Al Jazeera that North Korea's leader Kim Jong-un is continuing to test the boundaries as he has done since coming to power in 2011.
"What is different now, and what makes the situation potentially a lot more dangerous, is that people no longer know what the United States' policy is going to be. They no longer know how President Trump is going to react," said Penn.
"This is really the first major test since the 'fire and fury' speech which Donald trump gave. So the big 'X factor' - the thing of most concern - is what is the Trump administration going to do because its policies seem to have become rather unstable as compared to the past."
Four South Korean fighter jets bombed a military firing range on Tuesday after President Moon Jae-in asked the military to demonstrate capabilities to counter North Korea.
"Now all the eyes are on the UN Security Council. South Korea, Japan and the US have called for an urgent UNSC meeting that is likely to be held late on Tuesday. There is likely to be a push from some corners for even tougher sanctions to be introduced on North Korea," Al Jazeera's Hay said
"But that's unlikely to be supported by its traditional ally China."
Source: Al Jazeera and news agencies