Looks as if somebody will be sleeping on the Oval Office couch for a while.

First Lady Michelle Obama gritted her teeth in rage Monday as her husband treated Nelson Mandela’s memorial like a Justin Bieber concert, openly joking with the pretty blond prime minister of Denmark in the middle of the services.

The first lady’s icy glare seemed to be sending the message that the president’s antics were not fit for a solemn service for the world’s most respected human-rights leader.

But all of Michelle’s angry looks couldn’t kill her hubby’s inappropriate behavior — as he continued to laugh, flirt and whisper with Danish Prime Minister Helle Thorning-Schmidt.

The two leaders even posed for an iPhone “selfie” with British Prime Minister David Cameron.

The antics occurred as eulogies were being given inside Johannesburg’s FNB Stadium, where 91 world leaders had gathered to say goodbye to Mandela, who died Dec. 5.

The president’s glad-handing left Michelle Obama clearly furious and mortified. She refused to even look at what her hubby was doing with his fellow head of state.

And the first lady wasn’t the only one who was appalled.

“Why do Cameron and Obama feel the need to behave like idiots?” asked a blistering Daily Telegraph blog by British political columnist Iain Martin. “Why let a fuddy-duddy thing like manners get in the way of a social media opportunity, where we can put ourselves at the center of everything, clowning around like Muppets.”

Obama’s decision to take a selfie at the memorial like a teenager drew special condemnation.

“What selfish morons take a ‘selfie’ at a memorial service?” wrote one Twitter user.

The infamous Tumblr page “Selfies at Funerals,” which has exposed the trend for months, announced it would shut down because there could never be a funeral selfie more twisted than one of the president at a memorial for Nelson Mandela.

“Obama has taken a funeral selfie, so our work here is done,” the operator, Jason Feifer of Brooklyn, wrote.

At one point, Michelle switched seats with her husband, placing herself between the president and Thorning-Schmidt, who is 46 and married.

Obama also gave a eulogy, saying Mandela’s death should lead people all over the world to reflect on what they’ve learned from the South African liberator.

“With honesty, regardless of our station or our circumstance, we might ask: How well have I applied this lesson in my own life?” he said.

“It is a question I ask myself, as a man and as a president.”

Obama also used the speech to send a message back to political opponents in America, by calling for an end to income inequality.

“There are too many of us who happily embrace Madiba’s legacy of racial reconciliation, but passionately resist even modest reforms that would challenge chronic poverty and growing inequality,” he said, using Mandela’s clan name.

Obama’s address was welcomed with thundering applause from the crowd of about 50,000, who waved South African flags throughout the memorial.

Among the celebrities attending were former Presidents Jimmy Carter, Bill Clinton and George W, Bush, South African-born actress Charlize Theron, model Naomi Campbell and singer Bono.

The White House said Obama met with members of Mandela’s family, including Mandela’s widow, Graca Machel.

Mandela will be buried in Qunu, his ancestral home, about 450 miles south of Johannesburg.