Pope Francis toasted the cardinals who had just elected him by joking, “May God forgive you for what you’ve done.”

New details from inside the secretive Vatican enclave revealed that the humble Jorge Mario Cardinal Bergoglio of Argentina was overwhelmed by his elevation to the leadership of the world’s 1.2 billion Catholics.

Bergoglio, who was considered a very dark horse in a large field of candidates when the conclave began Tuesday, was surprisingly in third place on the first ballot, with the backing of South American cardinals.

He ran slightly behind the front-runners, Angelo Scola of Milan and Marc Ouellet of Canada, according to Carlo Marroni, respected Vatican correspondent for the Italian daily Il Sole 24 Ore.

But overnight, Scola’s supporters began to defect to Bergoglio. Local media reported that resentment of the way the Italian-packed Vatican Curia administration had handled the “Vati-leaks” scandal hurt Scola.

The Bergoglio bandwagon began to form in Wednesday’s two morning votes inside the Sistine Chapel. The realization he could become pope apparently unnerved him.

When Boston’s Sean Cardinal O’Malley sat beside Bergoglio at lunch, he said the future pope was uncharacteristically somber.

Entering the fifth ballot, Bergoglio was close to the 77 votes needed to become pope.

“It was very moving as the names were sounding out,” said Sean Cardinal Brady of Ireland. “Bergoglio, Bergoglio, and suddenly the magic number of 77 was reached.”

The “Princes of the Church” burst into tears.

“I don’t think there was a dry eye in the house,” said New York’s Timothy Cardinal Dolan.

Following tradition, Bergoglio was asked if he’d accept the awesome responsibility.

“I am a sinner,” he said. “But as this office has been given to me, I accept.”

After announcing that he would be called Francis, aides placed a throne-like chair on a platform for him to sit on so that the cardinals could pledge their obedience one at a time.

But instead, he came down from the platform and remained standing while they each greeted him.

“He met us on our own level,” Dolan said.

Later, the papal sedan arrived to take him to dinner at a Vatican residence, while cardinals packed into minibuses to join him.

The sedan returned empty. Dolan was among those who wondered where was the pope was.

“And the last bus pulls up, guess who gets off. It’s Pope Francis,” said Dolan. “I guess he told the driver, ‘That’s OK. I’ll just go with the boys.’ ”