ROME — Roma president James Pallotta agreed to pay a fine and apologized to Mayor Virginia Raggi on Wednesday after jumping into a downtown fountain to celebrate the team’s win over Barcelona.

Surrounded by a crowd of flag-waving Roma fans, Pallotta performed a backward somersault in his dress shirt and pants into a fountain in the Piazza del Popolo.

Pallotta was ecstatic after Roma surprised Barcelona with a 3-0 win Tuesday to overturn a three-goal first-leg deficit in the Champions League quarterfinals.

“I want to thank the mayor for my well-deserved fountain fine of 450 euros,” Pallotta said. “Certainly I got caught in the excitement.”

Pallotta, a Boston executive who was part of the four-man American team that purchased Roma in 2011, is also a minority owner of the Boston Celtics.

“We spoke and he apologized,” Raggi said. “He did it in a moment of excitement but he realizes the importance of the example he needs to provide. And clearly he’ll pay the fine.”

Pallotta met Raggi on Wednesday for a previously scheduled meeting and pledged to donate 230,000 euros to restore another fountain, in front of the Pantheon.

“I don’t want to encourage other people to jump into fountains, except if they want to fix a fountain,” Pallotta said.

Roma is still seeking final approval to start construction on a new stadium inspired by the Colosseum.