Hillary Clinton’s security detail hated her so much that they privately snickered after she accidentally fell and broke her arm when she was secretary of state in 2009, one of her former guards told the Post.

Clinton, then 61, was in the State Department basement on her way to meet President Obama when she took a spill — and ended up in the hospital for an operation to repair her shattered right elbow.

“We sort of got the last laugh. It was kind of like payback: You’re treating us like s–t. Hey karma is a bitch! We were smiling to ourselves,” the agent told The Post on Wednesday.

But Clinton, who frequently behaved like a diva-in-chief, according to the agent, made it worse by pointing the finger at her detail for the mishap.

“She blamed us for breaking her elbow, saying it was our fault and we could have prevented that. She’s bad news,” the agent said.

The agent’s account backed up FBI documents released this week that showed Clinton’s protective detail despised her for treating them with contempt.

“When I first met her, we were given specific instructions: don’t look at her, don’t look at her general direction and if you need to talk to her, keep it short and stay out of her way,” the agent told The Post.

‘It was kind of like payback. You’re treating us like s–t — hey, karma is a bitch!’

The agent also said Clinton acted like she was president while serving as secretary of state from 2009 to 2013 and once made a visibly annoyed President Obama wait for her as she schmoozed with foreign dignitaries at the United Nations.

“She was treating every stop like a campaign stop for the presidency, shaking hands with everyone and looking like a presidential nominee. It was like she was running for presidency for all the years she was secretary of state,” the agent said.

The incident happened in either 2009 or 2010 during the General Assembly as Clinton and Obama were making their way into a Security Council meeting with foreign leaders, the agent said.

“She took her nice sweet time shaking hands and schmoozing with the dignitaries,” said the agent. “She made the president wait to go into the meeting. She was making a fashionably late entrance.”

The agent added, “She was basically saying, ‘I don’t wait for the president, the president waits for me.’ Obama stopped, turned around and rolled his eyes a little bit. He looked at her in a way that inferred, ‘Let’s go.’”

By contrast, the security detail loved former Secretary of State Condoleezza Rice, Clinton’s predecessor who served under George W. Bush.

“Condoleezza Rice was a true diplomat. She built a lot of rapport with her security detail. She would talk to you about family, football, she was one of the boys,” the agent said. “Hillary didn’t care. If you weren’t in her little inner circle — Huma Abedin or Cheryl Mills – she wanted nothing to do with you.”

A Clinton spokesman did not immediately respond to a call or email request for comment.