It was the president and the pedo.

Photos obtained by The Post on Thursday show former President Bill Clinton posing aboard Jeffrey Epstein’s private jet — dubbed the “Lolita Express” — with the sex fiend’s alleged procuress Ghislaine Maxwell and one of his rape accusers.

The slew of images reveal the former commander-in-chief’s 2002 trip to Africa with Epstein and a host of celebrities, including accused perv Kevin Spacey and comedian Chris Tucker.

In one photo, Clinton and Maxwell smile at the top of the plane’s stairs, with the ex-president resting his arms on the alleged madam’s shoulder.

Another image shows Clinton with his arm slung around Chauntae Davies, then 22, who has accused Epstein of raping her when she worked as his personal masseuse.

Other images from the trip show Tucker with a set of headphones on, Spacey in front of a table heaped with jewels and Clinton chomping on a cigar.

Davies, now 40, has not accused Clinton, Tucker or Spacey of any wrongdoing on the five-day humanitarian trip, which she says was hosted by Clinton’s foundation.

There’s also no evidence the three famous men knew of the disturbing allegations against Epstein at the time. Davies says the rape did not happen on that trip. However, Davies told The Sun, “It’s clear that Epstein was using this private jet and his wealth to get close to rich and powerful people.

“Looking back at these images now, it raises a lot of questions about why Bill Clinton was using the plane and what perhaps Jeffrey may have been trying to accomplish by having him around,” she told The Sun.

Davies has said she was a young, aspiring masseuse in 2001 when she was introduced to Maxwell by one of her massage teachers and hired on the spot.

A few months later, after a handful of rubdown sessions, Davies said, Epstein raped her on his private Caribbean island and then two or three more times. Over the next few years, she continued to work as a masseuse for the financier and continued to have what she described as non-consensual sex with him.

The former president, though, was a “complete gentleman,” she said.

“I thought him to be charming and sweet.”

She said she could hardly believe the trip was real.

“I was going to Africa with the most eclectic group of people imaginable,” Davies recalled. “Everybody cracked jokes at one another. Clinton was chiming in cracking jokes along with us.”

Epstein, 66, died while locked up in federal jail in Manhattan shortly after he was arrested on sex-trafficking charges. His death was ruled a suicide by hanging.

In a previous statement, Clinton denied having knowledge of Epstein’s alleged behavior.