Pope John Paul II leaves Monday for a tour of the Philippines and Japan that will be the longest and most hectic of the nine foreign trips he has made so far. Because of the nature of the government of President Ferdinand Marcos in the Philippines, the trip has been one of the most difficult to arrange.

The pope told 50,000 people in St. Peter's Square today that the trip was "intended" to deepen the faith and commitment of the members of the Catholic Church and to advance the cause of peace."

Before arriving in Japan, where he is expected during a visit to Hiroshima to warn of the dangers of nuclear war, the pope willl spend six days in the Philippines to visit eight cities and deliver more than 30 speeches.

The Philippines is the only predominantly Roman Catholic country in Asia and a visit there was first mentioned almost two years ago, not long after John Paul's election in October 1978. Pope Paul VI had made the first papal visit to the country in 1970.

but, partly for political reasons, John Paul's trip was delayed until now, timed to coincide with the beatification of Filipino martyr Lorenzo Ruiz, the first such Roman Catholic ceremony to be held outside Rome.

The Philippines is an underveleloped country of 48 million people characterized by sharp differences in living conditions between a rich elite and impoverished masses, as well as by social and political unrest, guerrilla warfare and secessionist pressures from a Moslem minority.

In 1972 Marcos imposed martial law, and with it a suspension of almost all civil liberties. He ended martial law last month, but has retained his authoritarian grip by keeping in force many restrictive laws and decrees.

John Paul has spoken out strongly on human rights issues several times and Vatican observers believe one reason for the delay in the pontiff's trip was concern that his visit to the Philippines might be construed as an indication of support for the government.

At the Vatican, officials are putting in the final details of the itinerary, which includes stops in Karachi, Pakistan, and Guam, and a refueling stop in Anchorage, Alaska, on the polar flight home. A Vatican Radio editor, the Rev. Pasquale Borgomeo, said: "There are always attempts by some groups to exploit a papal visit. To avoid all risks the pope would have to stay at home."

He confirmed, nevertheless, that to clear the way for the visit the Vatican had to make clear that the pope would not be going as a guest of the government. After Marcos' wife, Imelda, had made public statements to that effect, he said, Vatican Secretary of State Agostino Casaroli wrote to the Philippine episcopate stressing that the pope's visit was in response to their invitation, originally linked to celebrations in late 1979 for the 400th anniversary of the Manila diocese.

Since that time both the Vatican and church authorities in Manila have emphasized that the purpose of the trip is primarily pastoral and without political significance.

There could be some political impact, however, if the pope speaks out about poverty, social justice and human rights. One priest here with considerable experience in the Far East said clerics in the Philippines had been writing to the pope insisting that for the trip to make sense, "you must speak out if you come."

In answer to concerns that the pope may be used, one Vatican official said dryly, "After all the traveling the pope has done -- to places like Brazil and Poland -- I think it's clear he knows how to take care of himself."

Although the trip to the Philippines has been the more controversial, there are indications that from the Vatican's point of view -- and the pope's, given his frequent references to it -- that the visit to Japan may be the more interesting.

There are fewer than 400,000 Catholics in Japan, which today is the only major industrialized country in the world without a Christian tradition. Nevertheless, because of the role played by the church during the missionary period, there is still significant Roman Catholic influence in educational circles and within a certain upper-middle-class elite.

Although they do not expect any wave of conversions, Vatican officials say they have been impressed with the curiosity in Japan with regard to the Catholic religion and thus consider the country ripe for further evangelization.

As a modern culture, it also represents an interesting challenge. "Let us not forget," said a progressive Roman cleric, "that non-Christian Japan has fewer social injustices than the Philippines," where Catholic explorers landed more than 450 years ago.