Pope Francis suffered a bronchial spasm on Friday that resulted in him breathing in vomit, requiring non-invasive mechanical ventilation, in a setback in his two-week battle against pneumonia, the Vatican said.

The 88-year-old pope responded well, with a good level of gas exchange, and remained conscious and alert at all times, a spokesperson said.

The development marked a setback in what had been two successive days of increasingly upbeat reports from doctors treating Francis at Rome’s Gemelli hospital since February 14.

The episode, which occurred in the early afternoon, resulted in a “sudden worsening of the respiratory picture”. Doctors decided to keep his prognosis as guarded.

We need your consent to load this Social Media content. We use a number of different Social Media outlets to manage extra content that can set cookies on your device and collect data about your activity.

The Vatican has made alternative plans for Ash Wednesday next week, making clear Francis still has a long road ahead.

Cardinal Angelo De Donatis, a Vatican official and former vicar of Rome, will preside over the March 5 ceremony and procession that inaugurates the church’s solemn Lenten season leading up to Easter in April.

In their Thursday evening bulletin, doctors said Francis’ clinical condition had confirmed that he was improving.

The Pope was alternating the high-flow supplemental oxygen he had been receiving by a nasal tube with a mask in a sign of improved respiratory function.

Medics have suggested the Pope is over the worst of his infection, though they are not saying he is out of danger yet (AP)

Additionally, Francis left his hospital room to go to his nearby private chapel to pray, while continuing with respiratory physiotherapy and work, the Vatican said.

For the second day in a row, doctors avoided saying Francis was in a critical condition, suggesting he had overcome the most acute phase of the infection.

But given the complexity of his lung infection, they said “further days of clinical stability are needed” before they revise their prognosis officially and say he is out of danger.

Francis has been at Gemelli Hospital since February 14 after his bronchitis worsened.

He has shown steady, albeit slight improvements since a respiratory crisis and kidney trouble over the weekend sparked fears for his life. The improvements beat back speculation of an imminent death, resignation or a conclave and signalled that he is still very much in charge.

Prayers continue to pour in from around the world for the Pope.

Francis’s upcoming engagements are being altered as he battles pneumonia (AP)

Despite his improvements, Francis’ near-term upcoming calendar of events is being changed. The Vatican cancelled a Holy Year audience scheduled for Saturday, and it remains to be seen if Francis would miss his Sunday noon blessing for the third week in a row.

In past years, when Francis has battled bronchitis and influenza in winter, he curbed his participation in Ash Wednesday and Holy Week events, which call for the pope to be outdoors in the cold leading services, participating in processions and presiding over prayers in the solemn period in which the faithful commemorate Christ’s crucifixion and resurrection.

Beyond that, Francis has a few major events coming up that he presumably would hope to keep if well enough. On April 27, he is due to canonize Carlo Acutis, considered to be the first millennial and digital-era saint.

The Vatican considers the Italian teenager, who died of leukaemia in 2006 at the age of 15, an inspiration for young Catholics.

Another important appointment is the May 24 commemoration of the 1,700th anniversary of the Council of Nicea, Christianity’s first ecumenical council.

The spiritual leader of the world’s Orthodox Christians, Patriarch Bartholomew I, has invited Francis to join him in Iznik, Turkey, to commemorate the anniversary, which he has called an important sign of reconciliation between the Catholic and Orthodox churches.

Before he became ill, Francis said he hoped to go, though the Vatican has not confirmed the trip.