The Polish legislature today gave the government expanded powers to jail opposition activists and censor materials, drawing sharp protests from independent deputies and from Poland's influential Roman Catholic Church.

Coming on top of temporary economic and other controls passed last week when martial law was formally ended, today's permanent amendments to Poland's penal code and censorship law were branded by the church as unnecessary and a throwback to the repressive Stalinist times of the early 1950s.

Taking the floor during a debate on the measures, Jan Szczepanski, a noted sociologist and independent deputy, warned the Communist government that excessive repression would serve only to "speed up the outbreak of emotions."

The government contends the new rules are needed to fill gaps in the law made apparent during the Solidarity era, when the government's legal restrictions against dissent were severely strained. However, Polish officials have sought to play down the significance of the changes, hoping the outcry about them will not ruin prospects for an expected rollback of some Western economic sanctions.

But critics attacked the new legislation as a sign of the Polish leadership's continued insensitivity to public opinion and predicted the move would further damage efforts toward national reconciliation.

Among the changes approved by the generally submissive 406-member parliament was an amendment to the legal code calling for up to three years in prison for people taking part in a banned organization, such as the former Solidarity trade union or the now defunct Independent Student Union. The same penalty was authorized for a person leading or organizing an illegal protest action. Ten deputies voted against the amendment and 13 abstained.

In addition, some imprecise language was added to the censorship law effectively broadening the state's powers to suppress material thought to endanger "the security of the state" or the "defensive capacities" of the country or if the contents of the material "obviously constitute a crime."

The Polish censors' jurisdiction was further widened to apply to texts imported from abroad, to artistic exhibitions and to trade union and political party publications that had been exempt under the old law. Nine deputies voted against these changes in the censorship act and 19 abstained.

Passed in 1981 during the Solidarity era, Poland's censorship act was considered liberal by East European standards. Polish government officials note that some of the most significant provisions of the act--such as the right to appeal in court a censor's decisions and the right to show spots in published texts where the censor has made deletions--have not been changed.

The amendments were initially proposed by the government as part of a package of measures accompanying the lifting of martial law last Friday but were dropped under pressure from the Catholic Church. Their passage today was widely seen as a particular affront to the church.

In an 11th hour attempt to squash the amendments, the Polish church yesterday sent a toughly worded letter to the legislature, charging authorities with introducing measures similar to those which were in effect during the harsh style of pre-1956 rule in Poland bearing the name of the late Soviet leader Josef Stalin.

This attack prompted authorities to modify the proposed amendments slightly. They dropped a provision that would have specified a maximum five-year jail term for someone spreading "false information" abroad harmful to Polish state interests. They also scratched a plan to include in the censorship law academic manuscripts and bibliographies. But these revisions did little to appease opponents of the legislation.

"If these are really minor changes as the government claims, then why are they necessary in comparison with the outrage they will bring?" asked Karol Malcuzynski, an independent deputy, after today's session.

The new measures were interpreted by some Poles and Western diplomats as an offering to Communist hard-liners in exchange for the ending of military rule and the granting of a partial amnesty for political prisoners and common criminals.

More than 500 people have been freed from jail so far under the conditional terms of the pardon. About half of them had been sentenced or were under investigation for politically motivated crimes, according to official figures.

Judges are expected to authorize the release of several hundred more jailed political activists during the next several weeks. However, most of the veteran opposition figures will remain in prison, denied freedom due to lengthy sentences or because they have been charged with or convicted of antistate crimes not covered by the amnesty decree.

Most prominent among those released so far is Janusz Inyszkiewicz, former national spokesman of Solidarity and a math lecturer at Warsaw University. Freed from Rakowieczka prison in Warsaw last night, he had been held there since April for taking part in illegal underground groups and possessing underground bulletins. Speaking to reporters, he said he believed he was released because authorities had no strong case against him.

The legislature also adopted today a package of tax laws that will affect virtually all sections of the economy as the government struggles to raise revenue to prop up welfare services affected by the economic crisis of the past few years.