North Korea fired three ballistic missiles off its east coast on Monday in a defiant reminder of the risks to global security, as world leaders including U.S. President Barack Obama gathered at a G20 summit in China for the second day.

North Korea has tested missiles at sensitive times in the past to draw attention to its military might. But Monday's launch risks embarrassing its main ally Beijing, which has gone to extraordinary lengths to ensure a smooth summit meeting in the eastern Chinese city of Hangzhou.

The missile test was also an unwanted distraction for the United States, which has been trying on the sidelines of the summit to finalise a deal with Russia for a ceasefire in Syria.

READ: North Korea fires three ballistic missiles as G20 leaders meet in China

U.S. Secretary of State John Kerry and his Russian counterpart Sergei Lavrov met in Hangzhou, but failed to clinch a breakthrough. Obama later talked with Russian President Vladimir Putin, but there was no immediate word on the outcome.

The South Korean military said Pyongyang launched the missiles at around 0300 GMT. The South's Yonhap news agency said the medium-range missiles flew for about 600 miles (1,000 km) and landed inside Japan's air defence identification zone.

The test prompted a quick meeting between South Korean President Park Geun-hye and Japanese Prime Minister Shinzo Abe in Hangzhou, and they agreed to cooperate on monitoring the situation, a Japanese statement said.

Earlier on Monday, the leaders of South Korea and China met on the sidelines of the G20 summit and Chinese President Xi Jinping reaffirmed Beijing's commitment to the denuclearisation of the Korean peninsula, state news agency Xinhua reported.

Park said a fourth nuclear test by North Korea this year followed by a series of missile tests had "gravely damaged peace on the Korean peninsula and the region and posed a challenge to the development of South Korea-China ties", Yonhap said.

Xi said China opposed the U.S. deployment of the THAAD anti-missile system in South Korea to counter missile and nuclear threats from North Korea.

Two years ago, the North fired two Rodong medium-range missiles just as Park and Abe were sitting down with Obama at the Hague to discuss a response to the North's arms programme.

In 2003, North Korea tested an anti-ship missile during an Asia-Pacific Economic Cooperation (APEC) summit held in Bangkok.

The G20 summit, bringing together leaders of the world's major economies, had largely focused in its main sessions on spurring the global economy, countering protectionism and removing trade barriers. A communique is to be issued before the meeting wraps up later on Monday.


ABE'S WARNING

At the morning session, Japan's Abe warned that the downside risks to the global economy were increasing, and the group need to respond with a sense of urgency, a Japanese spokesman said.

While inaugurating the summit on Sunday, Xi said the global economy was being threatened by rising protectionism and risks from highly leveraged financial markets.

With the summit taking place after Britain's vote in June to exit the European Union and before the U.S. presidential election in November, observers expect G20 leaders to mount a defence of free trade and globalisation and warn against isolationism.

The global economy has arrived "at a crucial juncture", Xi said, in the face of sluggish demand, volatile financial markets and feeble trade and investment.

"Growth drivers from the previous round of technological progress are gradually fading, while a new round of technological and industrial revolution has yet to gain momentum," he said.

G20 countries are set to agree in a communique at the end of the summit that all policy measures - including monetary, fiscal and structural reforms - should be used to achieve solid and sustainable economic growth, Japanese Deputy Chief Cabinet Secretary Koichi Hagiuda said.

"Commitment will be made to utilising all three policy tools of monetary and fiscal policies and structural reforms to achieve solid, sustainable, balanced and inclusive growth," Hagiuda told reporters on the sidelines of the summit.

Xi also called on G20 countries to match their words with actions.

"We should turn the G20 group into an action team, instead of a talk shop," he said.