VATICAN CITY -- Pope John Paul II died last night at age 84, ending one of the most influential papacies in the 2,000-year history of Christianity, as millions of Catholics prayed beneath his window and around the world.
As the bells of St. Peter's Basilica tolled, and a crowd of thousands stood in stunned silence in St. Peter's Square, a Vatican official, Archbishop Leonardo Sandri, broke the news, saying: ''Our Holy Father, John Paul, has returned to the house of the Father." He died at 9:37 p.m. local time (2:37 p.m. EST), the Vatican said.
Around the world, Catholics and non-Catholics flocked to churches and public squares, called in to talk radio, and posted messages on websites in the start of a global mourning for the only pope much of the world's population has ever known. Many acknowledged the dramatic impact of John Paul's remarkable 26-year papacy -- the third-longest in the history of the church -- during which he helped bring an end to the communist hold on Eastern Europe, improved relations between Catholicism and other faiths, and reshaped the leadership of the 1-billion-member Roman Catholic Church in his conservative image.
A somber President Bush -- a Methodist who had clashed with the pope over the Iraq war -- ordered the nation's flags flown at half-staff. Speaking from the White House shortly after news of the death, Bush referred to John Paul as ''the humble, wise, and fearless priest who became one of history's great moral leaders" and as ''a son of Poland who became the bishop of Rome and a hero for the ages."
''The Catholic Church has lost its shepherd, the world has lost a champion of human freedom, and a good and faithful servant of God has been called home," Bush said.
The pope last appeared in public Wednesday, unable to speak but bestowing a wordless blessing from his window to thousands of pilgrims in St. Peter's Square.
His physical decline and suffering were chronicled in detail over the years, as the twin effects of Parkinson's disease and arthritis left him unable to walk and with increasingly slurred speech. In his last days, millions were moved to pray for him as news bulletins relayed to a rapt public the details of the gradual failure of the aging pontiff's body.
His death sets into motion a several-week process for choosing a new pope. The Vatican said the funeral probably would be held between Wednesday and Friday.
After the funeral and nine days of mourning, the 117 cardinals eligible to vote will gather in the Sistine Chapel to choose the next occupant of the throne of Peter.
All but three of those cardinals were named by John Paul II, meaning the next pope is unlikely to be an advocate of significant change to church teachings.
In Boston, Archbishop Sean P. O'Malley hailed the pope, citing both his visit to Boston in 1979, at the vigorous start of his papacy, and his modeling of ''strength in the midst of suffering." John Paul was a key figure in O'Malley's career, choosing the Capuchin Franciscan friar three times to head dioceses wracked by clergy sexual abuse, and then, last June, bestowing on O'Malley the woolen band, called a pallium, that symbolically unites archbishops to the pope.
''Pope John Paul II was not only the vicar of Christ on earth, but also a world leader who changed the course of modern history," O'Malley said. ''In the pope's dedicated mission of sharing the good news of Jesus Christ, he exhibited great love for youth and the poor, and was untiring in promoting social justice, the family, and the gospel of life. Our lives, and our world, are forever changed for the better because of the Holy Father's vision and his passionate commitment to the truth and human dignity."
And on the plaza outside St. Peter's, families huddled together. Men and women wept. Some fell to their knees on the cobblestone square to pray. A moment after learning of the pope's death, the crowd burst into applause, a traditional sign in Italy of respect for a life that has ended.
''How do you say goodbye to so great a man?" said Raffaella D'Ambra, 32, of Rome, who leaned on the shoulders of her 10-year-old son and wept. ''All Rome is crying."
Across Rome, as church bells tolled and the news spread, people began to move almost instinctively toward the monumental dome of St. Peter's. Quietly, in groups of two and three, they filed down the streets laid out centuries ago to convey pilgrims to the basilica. By the dozen, some holding hands, some still eating gelato on a cool evening, they walked over the wide bridges of Ponte Vittorio Emanuelle and Ponte Sant'Angelo.
In the Trastevere neighborhood, the busy life of restaurants and bars continued, if subdued. Some people remained lined up outside popular trattorias, waiting for a late dinner table. Others grouped somberly in cafes around small televisions and radios. Some, noticing the open doors of the neighborhood church of St. Agatha, entered to pray silently in the largely empty pews; others quietly entered the vestibule, crossed themselves, and walked back out into the night.
Across the Atlantic, in Mexico City, a steady stream of faithful began arriving outside the fortresslike Papal Nunciature within an hour of the pope's death. Many wept as they laid bouquets beneath a rustic tile plaque with the pontiff's name; to one side of the stucco entranceway, two children's drawings bid farewell.
''Pope, I love you so much," was scrawled in crayon alongside a drawing of a tree losing its leaves, and signed ''Rodrigo Alvarado." His brother, Bernardo, drew a picture of a garden. The message was simple: ''Que te vaya bien, papa," Spanish for ''go well, ."
Many in the crowd were younger Mexicans. ''He was the only pope we knew," said Itzel Vargas, 33, a business manager for a technology company, who said she met the pope in 1979 when he visited her Catholic elementary school. Last night, she was sobbing as she laid a white flower beneath a small plaster statue of the pontiff.
''We feel like he was our pope, and now that he died, we feel very, very alone," she said.
John Paul's death brought a close to a grief-filled week, as a blood infection, a failing heart, impaired kidneys, falling blood pressure, shallow breathing, lapses in and out of consciousness ultimately led to the pope's death.
Throughout, Vatican officials gathered by his side, reciting prayers.
They insisted that he was lucid and serene through much of his decline, and according to spokesman Joaquin Navarro-Valls, on Friday night the pope seemed to say, perhaps referring to the young people gathered outside: ''I have looked for you. Now you have come to me. And I thank you."
John Paul's papacy was historic from the start: with his election, on Oct. 16, 1978, Karol Jozef Wojtyla became the first non-Italian pope in 455 years.
He enjoyed wide popularity, drawing large crowds as he traveled around the globe, appealing particularly to the world's youth. But he also presided over the church at a time of crisis, sparked by disclosures that multiple bishops had failed to remove sexually abusive priests from the ministry. That led John Paul II to accept the resignation of Boston's archbishop, Cardinal Bernard F. Law, in December 2002.
A survivor of both Nazism and communism in his native Poland, he was a forceful actor in many controversial issues both within and outside the church. He staunchly opposed abortion, capital punishment, and war, notably the US-led invasion of Iraq; he refused even to allow discussion of the ordination of women and criticized steps toward governmental recognition of same-sex relationships in parts of North America and Western Europe.
In Latin America, he took a dim view of liberation theology -- an effort to use political means to achieve social and economic gains for the poor -- and disciplined theologians whose views were seen by the Vatican as insufficiently orthodox.
Once a vigorous man who skiied and hiked while on vacation, the pontiff had been ailing for years. He was nearly killed by an assassin's bullet in 1981. But his final decline began Jan. 30, in the most ordinary of ways, when he showed flulike symptoms. The pope was hospitalized twice over the past two months. Yesterday, at 8 p.m. in Rome, the pope's longtime assistant, Archbishop Stanislaw Dziwisz, began a celebration of the Mass for Divine Mercy Sunday; at the Mass, the pope again received the Viaticum, which is Communion for the dying, as well as the sacrament of the anointing of the sick.
This morning in Rome, Cardinal Angelo Sodano will celebrate a Mass for the repose of the pope's soul in St. Peter's Square, and according to the Vatican, John Paul II's body will be brought to the basilica no earlier than tomorrow afternoon. The College of Cardinals is scheduled to meet at 10 a.m. tomorrow for the first time, and they will choose the exact date for the funeral.
The election, or conclave, is expected to begin in 15 days, but could be delayed until as late as the 20th day after the pope's death. At that gathering, only cardinals under age 80 may vote. The electors include 11 Americans, among them Cardinal Law.
Law, now archpriest of the Basilica of St. Mary Major in Rome, was among the Vatican officials leading a prayer service at St. Peter's Square just before the pope died. Archbishop O'Malley will not participate in the conclave because he is not a cardinal, but he is expected to travel to Rome for the funeral.
Paulson reported from Boston, and Sennott from Vatican City. Stephen Heuser of the Globe staff and Globe correspondent Sofia Celeste contributed to this report from Rome, and Globe correspondent Marion Lloyd contributed from Mexico City.Michael Paulson can be reached at email@example.com.