North Korean leader Kim Jong Un celebrated his 31st birthday on Wednesday by watching a basketball game that was played in his honor and featured players from the country that Kim has often threatened to obliterate.

The game had elements of comedy and farce. According to news reports, high-profile former National Basketball Association player Dennis Rodman bowed to Kim, whom he has called a “friend for life,” before tip-off and serenaded him with “Happy Birthday.”

Attendees said spectators were not allowed to bring cameras into the arena, which features enormous hanging portraits of Kim’s father and grandfather. The game was not broadcast on the state-run television network.

But footage posted on YouTube by Sky News showed players — both Americans and North Koreans — clapping rhythmically as Rodman sang to Kim, who sat courtside during the game.

Rodman, a bad-boy nonconformist since his playing days who is making his fourth trip to North Korea in the past year, organized the team of former NBA B-listers and street-ball players and led their trip to Pyongyang.

The hoops junket is a sort of oddball cousin to the ping-pong diplomacy exchanges between China and the United States in the 1970s. But while sports diplomacy is supposed to be appealing specifically because it’s not controversial, Rodman courted controversy as part of his trip.

The former Detroit Pistons star, who also played for the Chicago Bulls and three other NBA teams, has called Kim a “very good guy.” He shows little, if any, concern about the abuses that Kim has perpetrated as leader of one of the world’s most authoritarian nations, including the execution last month of his uncle and close adviser, and the detention of Kenneth Bae, an American who has been held captive in the North for more than a year.

Officials from the NBA, the State Department and the White House have sought to distance themselves from Rodman’s efforts and flamboyant tactics, which they describe as inappropriate outreach to an undeserving leader. Rep. Eliot L. Engel (D-N.Y.) called Rodman’s project “bizarre and grotesque” and likened it to having lunch with Adolf Hitler.

Two weeks before tip-off, the exhibition game lost its corporate sponsor, Paddy Power, an online betting site. One former NBA player, Charles D. Smith, told the Associated Press that he felt remorse about joining Rodman in a game that has been so overshadowed by political controversy.

“Because Rodman has made such inane comments about North Korea’s behavior, he has now become a target of criticism,” said Bruce Klingner, a senior research fellow at the Heritage Foundation. “There may be a reverse benefit to his trip, where it now highlights to a greater degree than he intended North Korea’s abuses.”

Rodman tried to explain himself in an interview with CNN that aired Tuesday. But his exchange with anchor Chris Cuomo quickly turned contentious, as Cuomo pressed him about Bae. “I don’t give a rat’s ass what the hell you think,” a sputtering Rodman finally said.

Rodman seemed to suggest that Bae had done something that merited punishment, although he did not specify what. Bae, a tour operator from Washington state, has been sentenced to 15 years of hard labor on charges of trying to overthrow the North Korean government.

“Dennis Rodman should stick to basketball and not cast aspersions on a fellow American who is being held by a foreign nation,” Rep. Rick Larsen (D-Wash.) said in a statement, adding that Rodman “clearly does not know what he is talking about.”

Kim reportedly adores basketball and rooted for one of Rodman’s former teams — the Bulls — as a teenager. Even so, his chumminess with the mercurial athlete is a curious choice and raises questions about his public-relations savvy.

Since inheriting power two years ago, Kim has snubbed some of the highest-profile visitors to his country, including Google Executive Chairman Eric Schmidt and Mongolian President Tsakhiagiin Elbegdorj. Kim has yet to meet with a single head of state, but he has spent boozy nights with Rodman, whom he invited in September to a private island off his country’s eastern coast.

Under Kim, North Korea has tested long-range missiles and nuclear weapons, abducted two Americans (one, an 85-year-old Korean War veteran, was released last month), and maintained its network of city-size gulags, lifetime prisons for those accused of political crimes.

Two U.N. agencies said jointly in November that 84 percent of households in the North have “borderline or poor food consumption,” but Kim has done nothing to address the country’s pressing food shortages. Instead, analysts say, he is emerging as a hedonistic spender, emptying the state coffers to build ski resorts and water parks — playlands that he has described as state priorities.

“North Korean society is a place where Kim Jong Un can do anything he wants,” said Koh Yoo-hwan, a professor of North Korean studies at Dongguk University in Seoul.

When Kim Jong Un entered the arena with his wife before Wednesday’s game, there were “several minutes of cheering, saluting, shouting ‘Manseh’ — meaning 10,000 years, a long life,” Simon Cockerell, a tour group operator, said in a Skype video posted on YouTube. The cheering continued, Cockerell said, “until Kim Jong Un basically told everybody to sit down, and the game began.”

The contest was friendly. After a first half in which they competed against each other, the U.S. and North Korean teams were mixed for the rest of the game, AP reported. Rodman said it was a “historic day” for “everybody in the world.”

Yoonjung Seo contributed to this report.