The assertion, if true, would dramatically escalate the nuclear challenge from one of the world's most isolated and dangerous states.
In an announcement, North Korea said the test had been a "complete success." But it was difficult to tell whether the statement was true. North Korea has made repeated claims about its nuclear capabilities that outside analysts have greeted with skepticism.
"This is the self-defensive measure we have to take to defend our right to live in the face of the nuclear threats and blackmail by the United States and to guarantee the security of the Korean Peninsula," a North Korean announcer said, reading the statement on Central Television, the state-run network.
The North's announcement came about an hour after detection devices around the world had picked up a 5.1 seismic event along the country's northeast coast.
It may be weeks or longer before detectors sent aloft by the United States and other powers can determine what kind of test was conducted. Ned Price, a spokesman for the White House National Security Council, said in a statement that U.S. officials "cannot confirm these claims at this time."
But he said the White House expected "North Korea to abide by its international obligations and commitments."
The tremors occurred at or near the Punggye-ri nuclear test site, where three other tests have been conducted over the past nine years.
In recent weeks, the North's aggressive young leader, Kim Jong Un, has boasted that the country has developed the technology to build a thermonuclear weapon - far more powerful than the low-yield devices tested first in 2006, then in different configurations after President Barack Obama took office, in 2009 and again in 2013.
The televised announcement said the test had been ordered by Kim, only three days after he signed an order Sunday for North Korean engineers to press ahead with the attempt.
The announcer added that for the North to give up its nuclear weapons while Washington's "hostile policy" continued would be "as foolish as for a hunter to lay down his rifle while a ferocious wolf is charging at him."
Satellite photographs analyzed by 38 North, a Washington research institute that follows the North's nuclear activity closely, showed evidence of a new tunnel being dug in recent weeks.
Another test by itself would not be that remarkable. The North is believed to have enough plutonium for eight to 12 weapons, and several years ago it revealed a program to enrich uranium, the other fuel for a nuclear weapon.
But if the North Korean claim about a hydrogen bomb is true, this test was of a different, and significantly more threatening, nature.
In recent weeks, Kim, believed to be in his early 30s and determined to accelerate the nuclear weapons program that his grandfather and his father promoted to give the broken country leverage and influence, boasted that North Korea had finally developed the technology to build a thermonuclear weapon.
When Kim first made the claim, in December, the White House expressed considerable skepticism, and several experts say that the accomplishment would be a stretch, although not impossible.
Outside analysts took the claim as the latest of several hard-to-verify assertions that the isolated country had made about its nuclear capabilities. But some also said that although North Korea did not yet have H-bomb capability, it might be developing and preparing to test a boosted fission bomb, more powerful than a traditional nuclear weapon.
Weapon designers can easily boost the destructive power of an atom bomb by putting at its core a small amount of tritium, a radioactive form of hydrogen.
Lee Sang-cheol, the top nonproliferation official at the South Korean Defense Ministry, told a forum in Seoul last month that although Kim's hydrogen bomb boasts might be propaganda for his domestic audience, there was a "high likelihood" that North Korea was developing such a boosted fission weapon.
And according to a paper obtained by the South Korean news agency Yonhap last week, the Chemical, Biological and Radiological Command of the South Korean military "did not rule out the possibility" of a boosted fission bomb test by the North, although it added it "does not believe it is yet capable of directly testing hydrogen bombs."
For the Obama administration, which only six months ago defused the Iranian nuclear threat with an agreement to limit its capabilities for at least a decade, the announcement rekindles another nuclear challenge - one that the administration has never found a way to manage.
The North has refused to enter the kind of negotiations that Iran did. Unlike Iran, which denies it has interest in nuclear weapons, the North has forged ahead with tests and told the West and China it would never give them up.
Obama, determined not to offer the country new concessions, has neither acknowledged North Korea is a nuclear power nor negotiated with it. The White House has said that it would restart talks with the North only if the goal - agreed to by all parties - was a "denuclearized Korean Peninsula."
China has also failed in its efforts to rein in Kim. He has never been invited to Beijing since his father's death, and Chinese officials are fairly open in their expressions of contempt for him. But they have not abandoned him or cut off the aid that keeps the country afloat.
With the test Tuesday night - Wednesday in North Korea - three of the North's four explosions will have occurred during the Obama's time in office.
Combined with the North's gradually increasing missile technology, its nuclear program poses a growing threat to the region - although it is still not clear the North knows how to mount a nuclear weapon on one of its missiles.
The test is bound to figure in the U.S. presidential campaign, where several candidates have already cited the North's nuclear experimentation as evidence of U.S. weakness - although they have not prescribed alternative strategies for choking off the program.
The United States did not develop its first thermonuclear weapons - commonly known as hydrogen bombs - until 1952, seven years after the first and only use of nuclear weapons in wartime, the weapons dropped on Hiroshima and Nagasaki.
Russia, China and other powers soon followed suit.