Pope John Paul II was shot and seriously wounded as he greeted tourists and pilgrims in the sunlit majesty of St. Peter's Square today. Italian police arrested a young man described as a right-wing terrorist who had escaped from prison in Turkey.

After 5 1/2 hours of surgery for bullet wounds from the assailant's 9 mm Browning pistol, the 60-year-old pontiff was reported by Vatican officials to be in "guarded" condition -- but out of immediate danger of death -- and the Vatican radio said "there are hopeful signs of recovery."

Luigi Candia, director of Policlinico Gemelli Hospital where the injured pope was rushed, said John Paul was hit in the right forearm and the second finger of the left hand. Two other bullets entered his lower abdomen, damaging his intestines but missing his vital organs, Candia said, with one bullet lodging in the cavity and the other traveling out the other side of the pope's body.

The Italian news agency ANSA reported that police said they found a letter written in Turkish on the accused assailant boasting in advance that he was planning to kill the pope to underline to the world "the imperialistic crimes committed by the Soviet Union and the United States and against the genocide they are committing in El Salvador and Afghanistan," according to The Associated Press. The gunman apparently acted alone, they added.

Two other persons, both foreign tourists, also were wounded in the shooting. A 58-year-old American woman, identified as Ann Odre of Buffalo, N.Y., on a tour with Roman Catholics that she hoped would include a papal audience, was seriously wounded in the chest and taken to Rome's Santo Spirito Hospital. A 21-year-old Jamaican, identified as Rose Hall, received a slight wound in the arm. Italian police said.

Although historians record as many as 30 violent papal deaths from martyrdom or murder in the early days of the church, the attack today marked the most serious known assassination attempt against a pope in modern times. The last direct attack came in 1970, when a Bolivian painter slashed at Pope Paul VI in the Philippines, but a bomb exploded Feb. 16 in a Karachi, Pakistan, stadium minutes before John Paul entered to say mass during his Asian tour earlier this year.

Today, John Paul was leaning forward from the white, jeep-like open vehicle known as his "pope-mobile" to shake hands with a well-wisher when four or five shots cracked sharply at 5:17 p.m. [11:17 a.m. EDT], witnesses reported. He was completing a round of the 20-acre square in front of St. Peter's Basilica, nearing the Bernini Colonnade, under the eyes of more than 10,000 onlookers gathered for his weekly general audience.

After being shot, the white-haired pope stood still for a moment, turned pale and then collapsed into the arms of his personal secretary, Msgr. Stanislaw Driwisz, the witnesses said. Some reported seeing bright red blood dripping onto his white papal vestments, dramatic symbols of what officials described as the first act of modern-day terrorism in the Vatican.

Plainclothes security officers jumped aboard and policemen on duty in the square formed a running phalanx around the vehicle as it sped around wooden benches set up for the audience, through the Gate of the Bells and into the Vatican proper. Wails rose from the crowd as bystanders realized what had happened. Some men and women wept openly, putting hankerchiefs to their eyes. Others dropped to their knees, praying for the pontiff's health.

The Italian news agency, ANSA, reported that as the pope was being rushed three-quarters of a mile to the large Catholic hospital in a Red Cross ambulance, he was praying out loud in Polish. Upon his arrival there, a male nurse told reporters, the pope murmured, "How could they do it?"

"He was always conscious, until when he was given anaesthesia," said Attilio Silverstrini, the Vatican's secretary for public affairs.

A young man, said to have fired from a point about 15 feet away from the pope, was immediately subdued by bystanders in the square.As some in the crowd shouted "assassin," police took him into custody and hustled him into a nearby blue police van that roared away. Italian police later identified the gunman as Mehmet Ali Agca, a 23-year-old Turk who according to Turkish authorities is a rightist former economics student who once boasted of being a "one-man terrorist band."

Police sources and the agency Ansa reported that the Turkish Embassy here had tipped off local police that Agca had arrived in Rome about a week ago. Italian Interior Minister Virginio Rognoni tonight released a statement claiming that a "vast search" had been carried out after the tip was received.

Convicted of killing a prominent Turkish journalist in 1979, Agca escaped from jail a few days before the pope visited Turkey later that year, writing a letter to a newspaper proclaiming that he escaped "to kill the pope," according to Turkish authorities.

Upon arriving in Rome, Agca took lodging in a small pension not far from the Vatican where police said tonight they had found a false passport of undisclosed nationality in the name of "Farouk."

The assailant's 9 mm semiautomatic pistol was found on him when he was captured, police said. He told interrogators he had arrived in Italy from Spain traveling through France and Switzerland. There were no reports of specific charges being lodged against him. Under Italian law police may hold a suspect 48 hours before filing formal charges.

Shortly after the shooting, a Vatican spokesman said the pope's condition was "worrisome." But doctors at the hospital later said no vital organs had been damaged and that although there were lesions in the large and small intestines, they found no vascular lesions; that is, there was no uncontrollable bleeding.

In surgery to remove the lodged bullet from the lower abdomen, a hospital spokesman said, nearly two inches of the pope's damaged lower intestine were removed. The main danger after the operation lies in infection, according to doctors at the hospital. A hospital said the surgery included a temporary colostomy, which is n incision in the colon to create an artificial anus to help prevent infection.

"It was necessary, among other things, to transfuse three liters of blood for an adequate pharmacological sustenance," said a medical bulletin after the surgery.

Three liters amount to about six pints.

"We have sound hopes that the pope will remain with us, that he will continue to live," said Giancarlo Castiglioni, head of the hospital's surgery unit. "He was not hit in vital parts, but they were not light injuries. Important blood vessels were just barely missed and the pope was very lucky."

Although the full impact of his injuries will become known only over the coming days, the pontiff was given a good chance of making as speedy a recovery as possible because of his robust health.

A hospital spokesman reported that the pope recognized Italian President Sandro Pertini, who entered his room after the operation ended. The pope reportedly nodded to him.

Dr. Frederico Meneghini, who led the team that operated on Odre, said she suffered severe internal injuries from the one bullet that slammed into her chest.

"She is in very grave condition," he added.

Hall was listed in satisfactory condition.

When he is in Rome, the pope is protected by the 95-man force of Swiss Guards, who bear no arms except their medieval gear. There is also a 100-man plainclothes force. One of these police, Antonio Gugel of Venice, was on the vehicle with the pope and supported the wounded pontiff as they rode toward the ambulance.

According to the terms of the 1929 Concordat between the Vatican and Italy, persons committing crimes in the square are generally turned over to Italian authorities. Because the pope is a head of state, his assailant, if convicted in Italian courts, would probably be sentenced to life.

Six feet tall, John Paul at the beginning of his seventh decade remains stocky, muscular and vigorous. He is known for his love of sports. In his native Poland, he skied, canoed and climbed mountains. After becoming pope Oct. 16, 1978, he had a swimming pool built for the papal summer residence at Castel Gandolfo in the hills 15 miles south of Rome.

The pontiff's fitness was evident during his frequent foreign travels, when he kept up with schedules that his associates remarked would have exhausted many men his age. His visits -- which included Africa, Asia, Latin American and North America -- have several times brought him to regions with severe climates that he seemed to endure with aplomb.

With similar energy, John Paul has grappled with the social, political and moral issues of the times. He has firmly endorsed the Roman Catholic Church's stand against abortion and artificial means of birth control, disappointing advocates of change among the world's 581 million Catholics.

A campaign revolving around efforts to reform Italy's liberal abortion laws has been marked by a sharp church-state dispute. The Italian Church hierarchy land its supporters have vehemently defended the pope's right to speak out against abortion -- even on the eve of a referendum -- as he has done on several Sundays over the last month.

At the same time, he has spoken out strongly in favor of what he called the right of all people to justice and freedom from hunger, generally thought of as liberal causes.

During a visit to the Philippines earlier this year, for example, John Paul pointedly used a televised address with President Ferdinand Marcos at his side to warn that no government has the right to infringe on human rights in the name of law and order.

The people prominent advocacy of such political and social issues -- his message was echoed around the world by television and newspapers -- could have played a role in his being cosen as an assasination target.

The 1978 ascent of Pope John Paul -- then Cardinal Karol Wojtyla of Krakow -- came as a major surprise.

He was not only the first non-Italian pontiff in 456 years. He was also relatively young -- 58 years old at the time -- and largely unknown outside his native Poland. The crowd of 200,000 assembled in St. Peter Square for the announcement seemed puzzled when it heard his name.

But it broke into applause when Wojtyla addressed them in fluent Italian from the balcony of St. Peter's Basilica.

"Even if I cannot explain myself well in your language, in our language, if I make mistakes you will correct me, he said evoking more applause.

In selecting Wojtyla, the Sacred College of Cardinals avoided an emerging polarization between conservative purists and liberals advocating greater experimentation. The Polish Church, symbolized by Wojtyla, appeared to offer a third way.

The powerful church in the communist-ruled Poland has developed an understanding into the nature of simultanous confrontation and coexistence under which it operated. Even communist authorities concede that 70 percent of the country's 35 million people are practicing Catholics. Far more than three decades, the authorities have sought to circumscribe the church's activities and influence.

As a key Polish Church leader, Wojtyla was one of the architects of the strategy must allowed the church to flourish and secure greater liberties than any other national church in Eastern Europe. In the process, however, Polish bishops had to develop diplomatic and tactical skills.

Moreover, the Polish church's philosophy stressed the importance of human freedom and thus seemed to be more in tune with conditions that prevail in most of the world.

John Paul's life has been a mirror of Poland's fate for much of the 60 years since he was born in the village of Wadowice, near Krakow, on May 18, 1920.

His parents were poor.His father was a laborer and later a noncommissioned officer in the Polish Army. When Wojtyla later became cardinal he was the first archbishop of Krakow's ancient see not to be a member of aristocracy.

Wojtyla was studying Polish language and literature at Krakow's Jagellonian University when Nazi Germany invaded Poland at the outbreak of World War II in 1939. The university was closed by the Nazis. He was sent to forced labor, first at a quarry and later at a chemical plant in Borek-Polecki. He managed to study after shifts. By 1942, Wojtyla began preparation for priesthood in underground classes.

He was ordained in 1946 and went to Rome for a while. Subsequently, he worked among Polish miners in France and Belgium before returning to Poland in 1948. His first parish was in the village of Niegowic. Its remoteness may have spared him from repression that other priests suffered in the late 40s and early 50s.

Wojtyla worked his way through the ranks of the Krakow's bierarchy, serving his apprenticeship under such seasoned churchmen as Cardinal Wyszynski and his precdecessor as Poland's primate, Cardinal Sapieha. In 1963 he was named archibishop of Krakow, the city that is still the spiritual capital of Poland. Four years later, in 1967, he was made cardinal. At 47, he was the second-youngest member of the College of Cardinals.

Wojtyla's section gave Poland two cardinals for the first time since the war and there were speculations at the time a clash might develop between him and the strong-willed Wyszynski. However, their relations are excellent by all accounts.

Wyszynski was undisputedly first among Poland's Catholics in setting the tone of the church's policy, the timing of its challenge to the state and restraining the people when that was required. Wojtyla always supported the primate.

Their relationship is symbolized during an Oct. 22, 1978, formal audience in the Vatican when each member of the College Cardinals came forward to kiss the new pope's ring in a sign of loyalty. When Wyszynski's turn came, the pontiff prevented the Polish primate from stooping to kiss his ring. Instead, the pope rose to kiss the primate on his forehead and cheeks, then himself bent to kiss Wyszynski's ring.

Where they differred was in their styles. In contrast to the formal primate, Wojtyla has always seemed more modern and less formal.Wojtyla as cardinal would turn up in Kraow at a jazz concert, a large man wearing a raincoat over his robe and slipping into the crowd without ceremony. Or his would join Polish skiers in the Zakopane region for a weekend of fun and sports.

His style and approach in reaching out to the people earned Wojtyla more than the dutiful reverence of religious Poles. He won their respect and friendship as well.