Pope John Paul II's plan to visit the Philippines is causing a tug of war between the church and the state about whose guest he will be.

The dispute centers on whose invitation the pope has accepted -- that of Cardinal Jaime Sin, the archbishop of Manila, or that of Imelda Marcos, the powerful wife of Philippines President Ferdinand Marcos.

The two see both the status of their institutions and their personal prestige at stake.

Cardinal Sin, spiritual leader of the 42 million Filipino Catholics who make up more than 80 percent of the population of Asia's only Christian country, has been an outspoken critic of the martial-law government.

Mrs. Marcos, an influential figure in the government, holds the posts of human settlements minister and governor of metropolitan Manila and has ambitions for higher office.

The tug of war began two weeks ago when Sin announced that the pope had accepted his invitation to preside over closing ceremonies in December of the 400th anniversary of the archdiocese of Manila.

A few hours later, Foreign Minister Carlos Romulo released a statement saying the pope had accepted the invitation of Mrs. Marcos. The statement was reported prominently in government-controlled newspapers.

The church then released the text of a letter from the Vatican's secretary of state, Cardinal Agostino Casaroli, addressed to Sin, saying the pope would visit the Philippine church.

Last Sunday Sin ordered that the pope's acceptance be read in all churches throughout the Philippines -- to put the record straight, as far as the Catholic Church was concerned.

Mrs. Marcos' claim evidently is based on her personal visit to the Vatican in February, ostensibly to invite Pope John Paul II to attend the U.N. Conference on Trade and Development held here in May.

Critics charge that her main objective was to invite the pope to bless her and the president on their silver wedding anniversary, for which she had planned to build a $20 million basilica on a hill outside Manila.

Sin refused to endorse the basilica. Plans for it were dropped, and the pope did not come. The wedding anniversary celebration eventually took place in a renovated Malacanang palace in the presence of other invited dignitaries, including European royalty.

The church is determined that the pontiff's visit should not become a state affair, lest he appear to endorse Marcos' martial-law administration. Sin wrote to the pope in June, saying he would not allow the government to use the papal visit for political purposes.

The Catholic Church in the Philippines has been adhering closely to the Vatican's policy of avoiding direct confrontations with governments.

Sin, however, has become increasingly critical of the Marcos government, which critics have accused of military abuses and corruption.

In a recent interview, Sin, who has called for an end to martial law in the Philippines, complained that the government is abusing its military powers.

A similar haggle between church and state developed when Pope Paul VI visited the Philippines in 1970. The church then succeeded in keeping the papal visit within its purview.