Kim Jong Un turned 33 yesterday, and from the North Korean leader's perspective he had plenty to celebrate: Everyone's talking about him again.
After several years of being overshadowed by the more imminent threat of the Isis (Islamic State) and jockeying with Iran for the title of scariest nuclear regime, North Korea is back on the international agenda.
Governments around the world rushed to condemn Wednesday's nuclear test - regardless of whether it involved a hydrogen bomb, as Pyongyang claimed, or an atomic device in line with its three previous tests - and the United Nations Security Council called an emergency meeting. United States presidential hopefuls piled on with denunciations of Kim. Hillary Clinton called him a "bully", Marco Rubio said he was a "lunatic", and Ted Cruz dubbed him a "megalomaniacal maniac".
Kim, like his father, Kim Jong Il, is often viewed as a caricature: a rotund man with a bad haircut and a worse standard outfit, who spews invective at the outside world while watching basketball games in his luxurious palaces.
But with this week's test, Kim has shown he is no joke. He's playing the cards he has and he is exactly where he wants to be, said Michael Madden, who runs the North Korea Leadership Watch website.
"It's less than a month before the Iowa caucuses, and he's trying to put North Korea at the top of the debate and the discussion among US presidential candidates," Madden said. "All of the people running for the position of commander-in-chief now have to talk about North Korea."
The Kims have a habit of using their weapons programme as a bargaining chip, launching missiles and detonating nuclear devices so they can try to extract rewards from the international community for not doing so again. North Korea has repeated this pattern for more than 20 years.
Analysts are split on whether this week's test is a sign that Pyongyang wants to return to negotiations, despite its repeated assertions that the world must now accept it as a nuclear state, or an indication that it has entirely given up on the prospect of talks.
"North Korea had come to a fork in the road where it could either pursue diplomacy or brinksmanship," said Ken Gause, a leadership expert at CNA, a research company in Arlington.
There were intermittent attempts last year to bring representatives of the US and North Korea to the table, but they went nowhere.
"Kim Jong Un came to the conclusion that the diplomatic strategy was not showing progress, so he made the decision to double down on the nuclear side," Gause said.
North Korea said the "Great Successor" himself ordered Wednesday's explosion.
"Respected Kim Jong Un ... issued an order on conducting a test of the first hydrogen bomb of [North] Korea," the state-run Korean Central Television station said in a broadcast this week, showing pictures of Kim sitting at his desk and shots of handwritten instructions bearing Kim's name.
Indeed, as much as Kim apparently wants to work his way into the international spotlight, this week's test also served an important purpose at home.
Kim is presenting himself as a strong leader who is taking his country forward in the face of "hostile policies" from a "gang of cruel robbers", as the North's state media characterised the US this week.
"North Korea is extremely careful about timing," said Sue Mi Terry, a former CIA analyst now at the business consultancy Bower Group Asia. "Now it's time to show that he's a strong, powerful, legitimate leader. And it's his birthday. So why not?"
The bigger reason for Kim to flex his nuclear muscles now, after almost three years without a test, is the upcoming congress of the Korean Workers' Party, the backbone of the communist state, in May. Such a gathering has not been held in 36 years, since Kim Jong Il was announced as heir to his father, founding President Kim Il Sung, in 1980.
Just a week ago, Kim - wearing new glasses that served to make him look even more like his grandfather - delivered a New Year's address in which he said the congress would "unfold an ambitious blueprint for hastening final victory for our revolution". Some analysts expect the regime to revise the party charter, the organising document of North Korea's political system, at the congress and enshrine Kim's two-track "byungjin" policy - the idea that North Korea can develop its economy and its nuclear programme simultaneously.
"Instead of being just some new flowery language in an otherwise boring political document, they will be able to hold up a tangible accomplishment to that effect," Madden said.
Being able to claim he is presiding over advances in both the economic and the nuclear spheres will help Kim to bolster his legitimacy.
Although it has been four years since he inherited the world's only communist dynasty, Kim lacks the mythological aura that attended his father and grandfather.
Kim Il Sung was heralded as a brave, anti-imperialist revolutionary, and Kim Jong Il was said to have been born on Korea's sacred mountain under a bright star at night. But there was not time to manufacture a story for Kim Jong Un, who was educated partly in Switzerland, and to deify him in the propaganda this way.
This, plus the fact that he is so young in a society that prizes seniority, continues to prompt questions about the legitimacy of his leadership and the strength of his grip on power.
The critical messages assaulting his legitimacy that were broadcast into the North from South Korea last year were thought to be a driving factor behind Pyongyang's eagerness to strike a deal with Seoul.
After the North agreed to express regret for severely wounding two South Korean soldiers, Seoul agreed to turn off the speakers.
But in response to the "grave provocation" of this week's nuclear test, South Korea's Government yesterday resumed the broadcasts at noon local time yesterday.
The questions about the legitimacy of his rule have made the consolidation of power Kim's top priority. Claiming to have overseen the development of a hydrogen bomb - and North Korea's closeted populace will not hear the scepticism about this claim that now abounds outside - will help him further stake his claim.
As Gause puts it: "He wants to be able to say 'My father developed the nuclear capability. Now I'm taking it to the next level'."