There was no independent confirmation that the detonation was a hydrogen bomb rather than an atomic device.
The test is a direct challenge to US President Donald Trump, who hours earlier had talked by phone to Japanese Prime Minister Shinzo Abe about the "escalating" nuclear crisis in the region and has previously vowed to stop North Korea developing nuclear weapons that could threaten the US.
North Korea, which carries out its nuclear and missile programmes in defiance of UN Security Council resolutions and sanctions, said in an announcement on state television that a hydrogen bomb test ordered by leader Kim Jong-un was a "perfect success" and a "meaningful" step in completing the country's nuclear weapons programmes.
The bomb was designed to be mounted on its newly developed intercontinental ballistic missile, the North said.