Poland's Communist Party leader, Stanislaw Kania, resigned today in the face of mounting criticism by political opponents of his inability to meet the challenge posed by the independent Solidarity trade union federation.

The party's policy-making Central Committee, by an overwhelming vote, immediately replaced Kania with Gen. Wojciech Jaruzelski, who already holds the posts of premier and defense minister and becomes the first military officer to head Poland's Communist Party.

After his election, Jaruzelski said the most important task was "to fulfill public expectations for change and an improvement in the situation and to overcome the crisis and strengthen the socialist state." He also described Poland's alliance with the Soviet Union as of "invaluable significance."

The official Soviet news agency Tass reported the change in Polish leadership without comment. In Washington, a State Department spokesman said it was "too soon for a full assessment" of the change but that "since February, as premier, Jaruzelski has associated himself with a policy of seeking negotiated solutions with Solidarity."

The decision came at the end of a stormy three-day Central Committee session that also called for a temporary ban on strikes and tougher action against Solidarity.

Kania's resignation makes him the second party leader -- the top position in any communist country -- to fall from power since the start of the Polish labor crisis in July 1980. He had replaced Edward Gierek as party secretary in September of that year.

During the same period, two premiers -- Edward Babiuch and Jozef Pinkowski -- have also fallen victim to the difficult task of reconciling the conflicting demands of the Polish people and the leadership of the Soviet Union.

The Central Committee accepted Kania's resignation by a vote of 104 to 79 before approving Jaruzelski by 180 to 4, according to the official Polish news media. The relatively strong support that Kania received is an indication of the deep split within the Polish party leadership.

Amid general dissatisfaction over present political trends, there is sharp disagreement in the party over whether the solution lies in building a new and broader national consensus or in cracking down hard on Solidarity, if necessary to the extent of declaring martial law.

After a night of consultations with regional party chiefs, the Central Committee decided against taking steps to authorize a state of emergency. Instead, it passed a resolution calling on parliament to temporarily suspend the right to strike and underlined the need to renegotiate the landmark Gdansk agreement that led to Solidarity's formation 14 months ago.

The resolution, adopted unanimously, criticized the party leadership for a lack of decisiveness and efficiency in carrying out policies. It warned that the communist authorities would use "the full force of the law" to defend vital state interests against threats to the nation's existence.

There was no immediate reaction from Solidarity to Kania's ouster or the resolution. Union leader Lech Walesa, who is visiting France, had earlier accepted the need to renegotiate parts of the Gdansk agreement -- perhaps trading unrealizable economic demands for fresh political concessions.

Despite the tough rhetoric from the Central Committee meeting, Solidarity and the government reached a limited agreement today on future price increases. After three days of talks in Warsaw, it was decided to establish a permanent economic council, with the union's participation, to oversee vital market supplies and other economic matters.

Solidarity agreed to stop a selective blockade of food exports in return for the provision by the Foreign Trade Ministry of detailed information on food exports and imports. The government had earlier agreed to a temporary price freeze on essential goods until further talks can take place on price reforms.

Polish political sources said one reason for Jaruzelski's election was his apparent retention of credibility with the Kremlin. Trained as a soldier in the Soviet Union, he has played a major role in integrating Poland's defense effort with the rest of the Soviet-led Warsaw Pact.

Jaruzelski, 58, paid tribute to his predecessor for what he described as "his great efforts in this difficult post." Unlike Gierek before him, Kania, 54, has not been consigned to immediate political disgrace and has retained a place on the 15-member ruling Politburo.

In the eyes of his fellow countrymen, Kania's main achievement was to avoid bloodshed at a time of almost revolutionary change in Poland. Throughout the many twists in the crisis, he insisted on political rather than military solutions.

As a politician, Kania's talent was for short-term political maneuvering rather than the formulation of an imaginative long-term strategy. Prior to his fall, he survived several serious attempts to get rid of him, including one inspired by a highly critical letter from the Soviet Communist Party last June.

Polish sources said that Kania decided to resign at midday today following strong criticism of his leadership by local party organizations during consultations overnight. He was accused of cutting himself off from rank-and-file opinion since the extraordinary party congress in July that overwhelmingly reelected him as party secretary.

It was Kania's close political ally, Kazimierz Barcikowski, who moved to propose Jaruzelski for the vacant post, at a meeting of the Politburo, the sources added.

How long Jaruzelski can continue to hold the triple function of party secretary, premier, and defense minister -- on paper an unprecedented accumulation of power for a Polish leader -- is unclear. Further personnel changes may take place at a meeting of parliament or a reconvened session of the Central Committee within a few days.