VATICAN CITY—Pope Francis went to a Rome hospital for scheduled surgery for a stenosis, or restriction, of the large intestine, the Vatican said Sunday.

The brief announcement from the Holy See’s press office didn’t say exactly when the surgery would be performed but said there would be an announcement when it was complete.

Just three hours earlier, Pope Francis, 84 years old, had cheerfully greeted the public in St. Peter’s Square in keeping with a Sunday tradition and told them he would go to Hungary and Slovakia in September.

A week earlier, the pope had used the same appearance to ask the public for special prayers for himself, which, in hindsight might have been hinting at the planned surgery at Rome’s Gemelli Polyclinic, a Catholic teaching hospital.

The Vatican said the pope had been diagnosed with “symptomatic diverticular stenosis of the colon,” a reference to a narrowing in the large intestine. The surgery was to be performed by Sergio Alfieri, the director of Gemelli’s digestive-surgery department.