structural:summarization, quality:correction, stylistic:style_transfer
Final months and death

On 23 September 1962, Pope John XXIII was diagnosed with stomach cancer. The diagnosis, which was kept from the public, followed nearly eight months of occasional stomach hemorrhages, and reduced the pontiff's appearances. Looking pale and drawn during these events, he gave a hint to his ultimate fate in April 1963, when he said to visitors, "That which happens to all men perhaps will happen soon to the Pope who speaks to you today."

Pope John XXIII offered to mediate between US President John F. Kennedy and Nikita Khrushchev during the Cuban Missile Crisis in October 1962. Both men applauded the pope for his deep commitment to peace. Khrushchev would later send a message via Norman Cousins and the letter expressed his best wishes for the pontiff's ailing health. John XXIII personally typed and sent a message back to him, thanking him for his letter. Cousins, meanwhile, travelled to New York City and ensured that John would become Time magazine's ' Man of the Year '. John XXIII became the first Pope to receive the title, followed by John Paul II in 1994 and Francis in 2013.

On 10 February 1963, John XXIII officially opened the process of beatification for the late Cardinal Andrea Carlo Ferrari, Archbishop of Milan from 1894 to 1921. This conferred upon him the title of Servant of God.

On 7 March 1963, the feast of the university's patron Saint Thomas Aquinas, Pope John XXIII visited the Pontifical University of Saint Thomas Aquinas Angelicum and with the motu proprio Dominicanus Ordo, raised the Angelicum to the rank of Pontifical University. Thereafter it would be known as the Pontifical University of Saint Thomas Aquinas in the city.

On 10 May 1963, John XXIII received the Balzan Prize in private at the Vatican but deflected achievements of himself to the five popes of his lifetime, Pope Leo XIII to Pius XII. On 11 May, the Italian President Antonio Segni officially awarded Pope John XXIII with the Balzan Prize for his engagement for peace. While in the car en route to the official ceremony, he suffered great stomach pains but insisted on meeting with Segni to receive the award in the Quirinal Palace, refusing to do so within the Vatican. He stated that it would have been an insult to honour a pontiff on the remains of the crucified Saint Peter. It was the pope's last public appearance.

On 25 May 1963, the pope suffered another haemorrhage and required several blood transfusions, but the cancer had perforated the stomach wall and peritonitis soon set in. The doctors conferred in a decision regarding this matter and John XXIII's aide Loris F. Capovilla broke the news to him saying that the cancer had done its work and nothing could be done for him. Around this time, his remaining siblings arrived to be with him. By 31 May, it had become clear that the cancer had overcome the resistance of John XXIII – it had left him confined to his bed.

At 11 am Petrus Canisius van Lierde as Papal Sacristan was at the bedside of the dying pope, ready to anoint him. The pope began to speak for the last time: "I had the great grace to be born into a Christian family, modest and poor, but with the fear of the Lord. My time on Earth is drawing to a close. But Christ lives on and continues his work in the Church. Souls, souls, ut omnes unum sint." Van Lierde then anointed his eyes, ears, mouth, hands and feet. Overcome by emotion, van Lierde forgot the right order of anointing. John XXIII gently helped him before bidding those present a last farewell.

John XXIII died of peritonitis caused by a perforated stomach at 19:49 local time on 3 June 1963 at the age of 81, ending a historic pontificate of four years and seven months. He died just as a Mass for him finished in Saint Peter's Square below, celebrated by Luigi Traglia. After he died, his brow was ritually tapped to see if he was dead, and those with him in the room said prayers. Then the room was illuminated, thus informing the people of what had happened. The Italian government announced three days of mourning with flags half-masted and the closure of offices and schools. Spain announced ten days of mourning with flags half-masted; Philippines announced nine days of mourning with flags half-masted; Paraguay and Guatemala announced three days of mourning; the Republic of the Congo declared one day of mourning. He was buried on 6 June in the Vatican Grottoes. Two wreaths, placed on the two sides of his tomb, were donated by the prisoners of the Regina Coeli prison and the Mantova jail in Verona. On 22 June 1963, one day after his friend and successor Pope Paul VI was elected, the latter prayed at his tomb. John XXIII's tomb is located near the tombs of both Pope Pius X and Pope John Paul II.