In his new book, “Guilty As Sin,” journalist Edward Klein peeks behind the curtain of Bill Clinton’s private penthouse in the presidential library in Little Rock, Arkansas. Klein claims the ex-president continues his cozy relationships with interns, muses about naked pool parties on the roof, and discusses with advisers how his wife — already scornful of his counsel — should deal with the escalating scandal over her unsecured private email server.

Bill Clinton was getting a foot massage.

“We were on the terrace of his apartment,” recalled the 20-something intern at the William J. Clinton Presidential Library and Museum who was massaging Bill’s feet. “We had a meal served from 42 [the restaurant in the Little Rock library] — ­vegan stuff like kale salad.

“He often invites girls like me who work at the library to his apartment for a glass of red wine and a massage,” the intern said in an interview for this book. “He likes his neck and shoulders massaged because he gets knots in his muscles. But what he really likes is to have his feet massaged. He just kicks off his loafers and socks and puts his feet on the coffee table. That really makes him happy.

“Bill is always flirting with the women at the library. He knows everybody by their first name and is incredibly kind and generous. When he talks to you, it’s like you are the only person in the world. I always called him Mr. President, naturally, but one day he looked at me with this horny look and said, ‘Call me Bill.’ I sort of knew then that I was in.

“I know what people would say if they knew I gave him a foot massage. But, hey, if it makes him happy, I’m happy to do it. The idea of touching the president of the United States that way is incredibly exciting to me.”

In the midst of the massage, the phone rang. Clinton listened for a moment, then put down the receiver.

“Damn!” he said, according to the ­intern’s recollection.

“What’s wrong?” she asked.

“Hillary just told a bunch of Iowa Democrats she’s on Snapchat,” Clinton said.

“So what?” the young intern said. “I’m on Snapchat. Everybody’s on Snapchat.”

“Yeah, but she said she loves Snapchat because all her emails disappear by themselves,” Clinton said.

“I still don’t understand,” the intern said.

“Just keep doing what you’re doing,” Clinton said.

While the intern went back to massaging his feet, Clinton made another call. He informed the person on the other end of the line that Hillary had cracked a joke about her disappearing emails at the Wing Ding dinner in Clear Lake, Iowa.

‘He often invites girls like me who work at the library to his apartment for a glass of red wine and a massage.’ - An intern at the Clinton library

The intern remembered Clinton saying: “She’s f–king over the FBI. How stupid is that! You and I need to talk. I’ll send a plane to get you.”

The man who arrived at the library was one of Bill Clinton’s oldest and most trusted advisers. [The source was interviewed more than two dozen times for this book.] They strolled out onto Clinton’s penthouse terrace, his friend carrying a tumbler of Johnnie Walker Black, Bill with a glass of red wine, which his doctor had prescribed for his heart.

“You’re right, this email thing is spiraling out of control,” the adviser said, according to his recollection of the meeting, which he later shared with the author of this book.

“From what I know of the case,” he went on, “she’s extremely vulnerable. It involves not only the FBI and the Justice Department, but two inspectors general in the intelligence community and the inspector general of the State Department. There are a number of statutes that she appears to have violated and national security laws that she may have breached.”

He took out several sheets of paper and began reading from a long list that amounted to a bill of indictment.

When his friend had finished ticking off the items on his list, Clinton asked, “So?”

“My recommendation is that Hillary get ahead of the situation by hiring an outside legal counsel,” the adviser replied, recalling the conversation for the author of this book. “She needs to secure the services of an expert legal counsel — preferably a big-league defense attorney from the Republican side of the aisle.”

Hillary, he added, needed to get some “discovery” as to where the investigation was going.

“You don’t want to be blindsided, and if you ignore it, pretend it’s a partisan ploy, and act scornfully, it will blindside you,” the adviser said. “That’s not where you want to be.”

“Hillary’s emails aside, there was a big problem with her campaign,” his adviser told the author of this book. “Bill knew — even if Hillary didn’t — that he had to be a major component of her campaign for it to work. He felt that the country had drifted to extremes on both sides and the only winning strategy was to persuade voters on the basis of their hearts — to be so appealing and likeable, they wanted to see you on television in their living rooms every night. He believed that he had that appeal. But he was far from certain that he had the stamina to do as much campaigning as needed to be done.

“The other component was the growing distance between Bill and Hillary,” the adviser continued. “She didn’t listen to much of what he said anymore. When he went on about policy and politics, she rolled her eyes and started checking messages on her BlackBerry.

“She resented the fact that Bill was treated like a rock star and that she had to work hard to create the illusion of enthusiasm. All Bill had to do is walk into a room. He gave off an electrical charge. Men lit up in his presence. Women swooned. Hillary had to scream to get attention.

“I think that if Hillary was more appreciative of Bill’s efforts and less resentful, he would’ve worked harder for her. It was exhausting to work for someone who didn’t appreciate you.

“I was with him at the apartment in Little Rock after a long telephone conversation with Hillary in which he held the phone away from his ear because she was shouting that he was interfering with her campaign. Finally, he cut her short and said he would call back later. He didn’t exactly hang up on her, but it was very close.

“Afterward, he slumped down in a chair and shook his head. He looked old and defeated. Then he got up, went out to his rooftop putting green, and started chipping shots into the Arkansas River. When he was done, he looked like his old self again.

‘He served champagne and cold beer and handed out roses … At one point, he got out a hose and sprayed some of the girls.’ - An adviser who spoke with Klein, author of 'Guilty as Sin

“He said, ‘She can do whatever the f–k she wants,’ and he started talking about his plans for building a swimming pool on the roof of the library. He wants to have naked pool parties the way JFK had pool parties when he was in the White House.

“He had an architect give him a feasibility report on building a pool, and it turned out that it would have been very expensive to build and disruptive to the functioning of the library. Anyway, the National Archives, which administers presidential libraries, probably would have vetoed the idea. So he dropped the plan. But for a while, he thought about getting an above-ground pool for the girls to splash around in.

“Bill has a bunch of women he regularly invites to his apartment. Most of them are young and good looking. He loves being surrounded by pretty girls. The place is completely secure, so he knows there’s no chance any photographers can get in.

“I was there at one of his parties on a hot, steamy day. He served champagne and cold beer and handed out roses, which he grows on the terrace and which are named after his mother, Virginia Kelley. At one point, he got out a hose and sprayed some of the girls.

“‘Keep that up,’ I told him, ‘and you’re going to have the first wet T-shirt contest ever held at a presidential library.’ ”

Excerpted from “Guilty As Sin: Uncovering New Evidence of Corruption and How Hillary Clinton and the Democrats Derailed the FBI Investigation,” by Edward Klein. Out this week from Regnery Publishing.