He was treated for a symptomatic diverticular stenosis of the colon.
"Operation finished, [Pope Francis] will remain under observation," the Vatican said in a statement.
The surgery was performed by Sergio Alfieri, head of the hospital's Digestive Surgery Complex Operational Unit.
Francis recalled nearly dying of the flu when he was 21 in his 2020 memoir, Let Us Dream: The Path to a Better Future.
Born Jorge Mario Bergoglio in Argentina, he was named pope in 2013, succeeding Benedict XVI.