Trading charges with Poland's Roman Catholic Church, a government spokesman today denied that Polish authorities are waging an antichurch campaign, but he accused some priests of "viciously attacking" the communist system and said they are doing harm to church-state relations.

At a regular weekly press conference, spokesman Jerzy Urban reaffirmed a government policy of cooperation with the church, to which 90 percent of Poland's population belongs, but said the "legal propriety" of sermons by some priests was under study, apparently raising the possibility of their prosecution.

His comments followed remarks yesterday by Poland's Roman Catholic primate, Cardinal Jozef Glemp, who rejected accusations of illegal clerical activity and charged that the government was conducting an intensified propaganda campaign against some priests as part of an "ideological struggle" with Catholicism.

"There are no attacks by Polish authorities on the Roman Catholic Church," Urban told reporters. "To the contrary, we declare the will to cooperate with the church and base our policy in this area on lasting foundations.

"But there is a group of priests who deliver political speeches and viciously attack our system and the political forces heading our country," he said. "The wide liberties which the church enjoys in our socialist state cannot be used by some priests against the state."

Church-state strains over official press reports about the clergy worsened during the trial of four secret police agents found guilty last week in the killing of the Rev. Jerzy Popieluszko, whose outspoken sermons championing the banned Solidarity union drew large audiences to his Warsaw parish.

Urban said two of the convicted policemen -- former colonel Adam Pietruszka and former captain Grzegorz Piotrowski -- have appealed their 25-year sentences. He said the deadline has not passed for the other two to file appeals.

Urban also indicated that a major shakeup was underway at the Interior Ministry, which controls Poland's plainclothed and uniformed policemen. He said the department in which the four convicted officers worked -- then responsible for monitoring the church and minority groups -- had been split into two departments under the command of new directors.

The department's former director, Gen. Zenon Platek, suspended two weeks after the murder of Popieluszko but not charged, is still suspended, Urban said, as is Lt. Col. Leszek Wolski, of the Warsaw office of the secret police, who monitored church activities.

Urban said a personnel review at the ministry is continuing. Asked whether the government is still looking for other possible instigators of the murder of Popieluszko, he said yes, although the six-week trial "produced no evidence" pointing to the involvement of others.

The issue of the church and politics promises to remain a point of contention between communist and Catholic officials. The church's view was outlined by Glemp in a sermon in Gniezno a week ago. He said he opposed the direct participation of clerics in political activity.

But he defended the right of priests to speak out on human rights, on "evil and deformation" and on "mistakes," presumably including those made by communist authorities. He also supported the involvement of priests in "social activity," saying it saves society from becoming dependent "on the program of a single social group."

With the crushing three years ago of the Solidarity movement, the pulpit has become the only independent institutional forum allowing for free expression in Poland. Urban said today that the number of priests who allegedly misuse their position to preach politics is less than 1 percent of the 21,000 clerics in the country. But those who do speak out attract crowds and western press attention, and so are worrisome to the regime.

Urban quoted alleged excerpts from recent sermons in Polish churches in which he said priests equated communism with Satan, likened the actions of Polish authorities to the Nazi Gestapo, and urged people not to join the communist party.