Regime confirms it set off its third nuclear bomb, signalled by an earthquake detected by South Korea, Japan and the US

North Korea has drawn widespread condemnation after conducting a nuclear test in defiance of international bans – a development signalled by an earthquake detected in the country and later confirmed by the regime.

The test, which took place in the north-east of the country just before noon local time, could bring North Korea a step closer to developing a nuclear warhead small enough to be mounted on a long-range missile and possibly bringing the west coast of the US within striking distance.

The authorities in Pyongyang said scientists had set off a "miniaturised" nuclear device with a greater explosive force than those used in two previous nuclear tests, in 2006 and 2009.

"It was confirmed that the nuclear test that was carried out at a high level in a safe and perfect manner using a miniaturised and lighter nuclear device with greater explosive force than previously did not pose any negative impact on the surrounding ecological environment," KCNA, the North's official news agency, announced.

The agency said the test had been in response to "outrageous" US hostility that "violently" undermined the regime's right to peacefully launch satellites – a reference to the condemnation and tighter sanctions that greeted Pyongyang's successful rocket launch almost two months ago.

Tuesday's test was quickly condemned by the UN general secretary, Ban Ki-moon, who said it was "deplorable" that Pyongyang had defied international calls to abandon it, adding that it was a "clear and grave violation of the relevant UN security council resolutions".

Barack Obama said the test was a highly provocative act that violated security council resolutions and posed a threat to US and international security. The US president called for "further swift and credible action by the international community" against North Korea.

China, once North Korea's closest ally, said it strongly opposed the test and warned North Korea to avoid any actions that could worsen the situation on the Korean peninsula.

"The Democratic People's Republic of Korea, heedless of widespread international opposition, has again carried out a nuclear test, to which the Chinese government expresses its firm opposition," the Chinese foreign ministry said in a statement.

"It is China's firm stance to realise non-nuclearisation for the Korean peninsula and prevent nuclear proliferation and maintain peace and stability in northeast Asia," the statement said.

Russia's foreign ministry said the Kremlin "decisively condemned" the test.

William Hague, the UK foreign secretary, joined the international chorus of condemnation and warned that North Korea faced further isolation if it did not stop developing its nuclear and ballistic missile capabilities.

Officials in South Korea, Japan and the US had earlier announced they were almost certain a controlled nuclear explosion had taken place at or near the site where the North's two previous tests were conducted.

Diplomats said the UN security council was convening an emergency meeting in response, although with so many sanctions already in place against the regime following precious nuclear tests and rocket launches it is not clear what options remain open to the international community.

Any push for a fresh round of sanctions could take weeks and come up against opposition from China, the North's only remaining ally and its biggest aid donor. Beijing had not commented on the test by mid-afternoon local time but had reportedly called on its neighbour not to go through with it.

The US, South Korea, Japan and European nations are expected to call anyway for a fresh round of sanctions against the North for defying previous security council resolutions banning it from testing nuclear weapons and ballistic missile technology.

A UN body that monitors nuclear tests said earlier it had detected an "unusual seismic event" in North Korea. "The event shows clear explosion-like characteristics and its location is roughly congruent with the 2006 and 2009 [North Korea] nuclear tests," said Tibor Toth, the executive secretary of the Comprehensive Nuclear Test Ban Treaty Organisation in Vienna.

The agency said it constituted "a clear threat to international peace and security, and challenges efforts made to strengthen global nuclear disarmament and non-proliferation, in particular by ending nuclear testing".

Seismic activity had been picked up by the US geological survey and monitoring stations in South Korea.

It appeared to be a more powerful blast than the North's two previous tests. Experts in South Korea, the US and Japan put the quake at magnitudes of between 4.7 and 5.2. Earthquakes of magnitude 3.9 and 4.5 respectively were detected in the North's 2006 and 2009 nuclear tests. The US geological survey said Tuesday's seismic activity had been of magnitude 4.9.

Yosuke Igarashi, an official at the Japan Meteorological Agency, said: "A natural earthquake normally starts with a smaller tremor followed by a larger one. This quake's strength was the same throughout."

The South Korean government raised its military alert level, while Japan was preparing to dispatch military aircraft to look for signs of atmospheric radiation.

In Tokyo, the prime minister, Shinzo Abe, called an emergency meeting of his security council to discuss Japan's response. "I have ordered that we consider every possible way to address this issue, including our own sanctions, while co-operating with other countries," he said after the meeting.

Tensions have been running high in the region since North Korea threatened to conduct a nuclear test in protest at fresh UN sanctions imposed after the regime successfully launched a satellite into orbit in mid-December.

The North again raised the diplomatic stakes when its most powerful military body, the National Defence Commission, warned that its ballistic missile and nuclear weapons programmes were targeted at the US.

Any progress the North makes in its missile and nuclear programmes is a cause for concern, although it is thought to be some way off having the ability to produce a nuclear warhead small enough to mount on a reliable long-range missile.

North Korea has enough plutonium to build between four and eight nuclear weapons, according to Siegfried Hecker, a nuclear scientist who visited the country's main Yongbyon nuclear complex in 2010.

Other reports suggest the country has enough fissile material for about a dozen plutonium warheads. In 2009, the regime said it would begin enriching uranium, giving it another means of building a nuclear arsenal.

Speculation had been mounting that this third test could involve a uranium device – a clear signal that North Korea's scientists have mastered the ability to produce highly enriched uranium.

In October 2012, a spokesman from the North's national defence commission told state media the country had built a missile capable of striking the US but did not provide further details. A missile featured in an April 2012 military parade appeared to be an intercontinental ballistic missile but its authenticity has not been verified by foreign experts.

Daniel Pinkston of the International Crisis Group in Seoul said: "The question is whether things could spiral. I agree there should be some costs and consequences, but as far as believing the consequences should deter them – I think that's wishful thinking.

"The [North Koreans] view the world as hostile and menacing; and if even China is hostile, then even more so. Other people might think OK, they will be more cautious and have second thoughts because even China will take action. But from their point of view it reaffirms why they need [a nuclear programme]. When the world is like this, do you not want to be a nuclear power?"

Analysts said the test, like the previous two, was designed to strengthen the North's bargaining position as the US, South Korea, Russia, China and Japan attempt to restart talks on Pyongyang's nuclear weapons programme.

Dr Leonid Petrov, a North Korea expert at the Australian National University, said it would bolster the North's case for describing itself as a genuine nuclear state.

"Obviously the [North Koreans] are not going to bargain and are not going to give up the nuclear options," Petrov said. "We have passed already the point of no return: North Korea is de facto a nuclear state, all we can do is minimise the damage."

Petrov suggested the North might be willing to freeze its civilian nuclear programme if given sufficient incentives, such as the loosening of international sanctions. It would also need assurances, particularly from the US, that it would not be the target of attempts at regime change or military strikes.

The only alternative, he said, was a pre-emptive strike that could miss many of the country's underground nuclear sites and raise the dangerous prospect of a counter-attack.

Petrov said the North's determination to push ahead with its nuclear programme was a failure of diplomacy that began with the administration of George Bush, who described the country as part of an "axis of evil" when Washington adopted a tougher stance in 2002.

"The world is now a much more dangerous place," Petrov said. "It's very sad."

Kim Min-seok, a South Korean defence ministry spokesman, said the North had informed China and the US in advance of its intention to conduct the test but could not say when the message was relayed.

Petrov said that, if true, the decision to inform other nations in advance was a marked change in the regime's approach under its leader, Kim Jong-un, who has been in power just over a year.

Kim has shown no sign of ditching the nuclear ambitions of his father, Kim Jong-il, but has been more open than the country's former leader about his regime's intentions, having also given notice of its recent satellite launch using a ballistic rocket.

• Read the latest developments on this story here