Pope John Paul II, visiting the city where American liberties were crafted, told more than one million Philadelphians gathered late today for a mass at Logan Circle that they must work to understand better the values of their nation's founding.

"Philadelphia is the city of the Declaration of Independence . . . containing a solemn attestation of the equality of all human beings," the pope said. "As citizens you must strive to preserve these human values, to understand them better and to define their consequences for the whole community."

Addressing the enormous crowd from a podium, where he was flanked by Mayor Frank L. Rizzo and hundreds of this troubled city's political and religious leaders, the pope made a strong plea for individual freedom and honesty in government.

"Human-Christian values triumph when any system is reformed that authorizes the exploitation of any human being, when upright service and honesty in public servants is prompted, when the dispensing of justice is fair and the same for all," said the pontiff.

At the mass, the pope did not refer specifically to the troubles hanging over this city.These include the suit the U.S. Justice Department filed against the city of Philadelphia last month, alleging that Rizzo and other city officials condoned systematic violence against citizens by police.

However, the pope, at a gathering of Philadelphia religious and business leaders at the Cathedral of Sts. Peter and Paul earlier today, made a direct plea that they work to improve the relationship between center city and suburbs. For several years, inner-city blacks and suburban whites have fought over attempts to build low-income housing on the fringes of the city.

"May the common dedication and the united efforts of all your citizens -- Catholics, Protestants and Jewish alike -- succeed in making your inner city and suburbs places where people are no strangers to each other, places where every man, woman and child feels respected, where nobody feels rejected, abandoned or alone," he said.

At Logan Circle, hundreds of thousands of people were crowded for six blocks behind the podium in the direction of City Hall as the pope celebrated mass. Hundreds of thousands more stretched in the other direction on the wide avenue leading to Philadelphia's art museum.

He was greeted with cheers, flowers and songs, but the mood here was less exuberant than it was at his earlier masses in Boston and New York. As he delivered his homily, hundreds of people walked away, several complaining that they could not hear a word.

"Values are strengthened when power and authority are exercised in full respect for all the fundamental rights of the human person," he told the gathering. "Freedom can never tolerate an offense against the rights of others."

The pope also repeated several points he made in Boston and New York, asking for a strengthening of family values and a greater sense of morality in youths.

Thousands of singing, cheering, flag-waving school children greeted John Paul at Philadelphia's airport on the southern rim of the city. They burst into cheers as his plane, Shepherd One, touched down an hour behind schedule. As the plane approached the waiting gates, one group spelled out "Welcome Pope John Paul" with red, white and black flashcards in both English and his native language, Polish.

The pope was so delighted by the welcome that he ignored the long black limousine that had drawn up for him and plunged into the crowd, greeting and hugging the children. Finally, he was officially greeted by several Pennsylvania politicians and church leaders, including Rizzo, Gov. Richard Thornburgh and Cardinal John Krol.

An hour and a half behind schedule, the pope began his motorcade up Broad Street toward City Hall. The motorcade was supposed to move at about six miles per hour along the way, but it whisked along at about 25 mph to make up for lost time. As the pope moved north toward the center of town, people on the sides of the street began running after the motorcade.

Originally, the pope was supposed to follow the normal flow of traffic around the east side of City Hall. But city officials made a last-minute change, rerouting the pope to the west to keep him from seeing the X-rated movie theaters and pornography shops on the east side of the hall.

The crowds began gathering about 24 hours before the pope arrived. About 3,000 people, many with sleeping bags, attempted to camp out Tuesday night close to the podium at Logan Circle. However, late that night police forced the campers to leave. About 1,000 people slept in the streets through an overnight rain.

In sharp contrast to the intimate family feeling that more than 80,000 New Yorkers managed to create last night, the mass in Philadelphia was more like an Italian street fair.

Kids played kick-the-can with layers of refuse left behind by those who had waited all day, and yelled at their friends, ignoring what was going on at the altar. Hawkers peddled souvenirs.

The pope and celebrants of the mass on the altar platform were isolated from the worshipers by a 50-foot moat of shrubbery and flowers.

A young woman wearing a gold cross over her yellow Chestnut Hill sweatshirt said as she left the area, "There's a little too much noise for me. It's not exactly the right atmosphere."

During his homily, the pope asked for a strengthening of family values and a greater sense of morality in youth.

"There can be no true freedom," the pontiff said, "without respect for the truth regarding the nature of human sexuality and marriage.

"Moral norms," he added, "do not militate against the freedom of the person or the couple; on the contrary, they exist precisely for that freedom, since they are given to ensure the right use of freedom."

The pope also took the opportunity to apply the moral standards he set forth in the speech to the Catholic clergy.

"What I have said here regards the whole of conjugal morality," the pope said, "but it applies as well to the priests with regard to the obligations of celibacy."

Later, in a speech to seminarians at St. Charles Seminary, the pope took up for the first time in his U.S. trip the issue of priestly celibacy.

"I want to remind you of the importance of fidelity," the pope said.

"During these years in the seminary, take time to reflect on the serious obligations and the difficulties which are part of the priest's life," the pope said. "Consider whether Christ is calling you to the celibate life."

"Before you can be ordained, you are called by Christ to make a free and irrevocable commitment to be faithful to him and to his church," he said. "Human dignity requires that you maintain this commitment that you keep your promise to Christ no matter what difficulties you may encounter, and no matter what temptations you may be exposed to."

Before leaving New York, the pope had journeyed to Battery Park at the lower tip of Manhattan where he addressed thousands of sons and daughters of immigrants waiting for hours in the rain.

With the Statue of Liberty visible over his left shoulder through the mist the pope said: "This is an impressive symbol of what the United States has stood for from the very beginning of its history."

It was there, at the southern tip of Manhattan, that the pope also offered his first special statement for the nation's Jews, hailing the "deep and permanent link between Jews and Catholics."

After the speech, Margaret Peralta, a Brooklyn housewife, said: "We may have come from different places, but we're all in the same boat now. That's a good message for the pope to bring to America."

Many in the crowd wore their oldest clothes because of the strong wind and slanting rain. The pontiff took off his skullcap and repeatedly had to turn back his cape as the wind blew it up around his neck.

In his farewell to America's largest city, the pontiff spoke to about 70,000 people in Shea Stadium in an address during which he used four languages, beginning in English, then Spanish, Polish and Italian. So warm was his welcome that when he mispronounced, then caught himself and correctly pronounced the word "skyscraper," the crowd erupted in cheers.

"Above all, a city needs a soul if it is to become a true home for human beings. You, the people must give it this soul. And how do you do this? By loving each other," the pope said.

Then to the strains of "The Battle Hymn of the Republic," the pope made his way through the cheering crowd and headed for the airport -- leaving behind thousands of New Yorkers exalted by his visit.