WARSAW, JULY 7 -- Poland's feuding leaders -- trade union chairman Lech Walesa and Prime Minister Tadeusz Mazowiecki -- held a private meeting today and reportedly agreed to try to patch up a quarrel that has paralyzed the Solidarity-led government.

Walesa and Mazowiecki met near Warsaw under the mediation of a Roman Catholic archbishop. The Polish news agency said they each promised to work together to speed up "deep reconstruction of the state" while "preserving social peace."

"Both resolved to see to it that reforms develop further and existing differences in political views . . . do not destabilize the situation in Poland," the Polish news agency said. In recent months, Walesa has accused Mazowiecki of moving too slowly in ridding the government of former Communists.

Walesa, who exercises enormous influence over workers and has demonstrated that he alone can head off crippling strikes, has insisted that he should become president. From that position, he says, he will swing a "sharp ax" and force former Communists from public life.

On Friday, in a tacit admission that Walesa had undermined the legitimacy of his government, Mazowiecki fired three former Communists from his cabinet. The prime minister also said that national elections should be held soon -- elections that would probably make Walesa president.

Mazowiecki, who was handpicked for his job by Walesa last year, also promised that his government will do more to ease the pain of economic reform for workers and farmers.

As Walesa and Mazowiecki met in seclusion, thousands of farmers marched through the streets of Warsaw demanding guaranteed minimum prices for their crops. They sang hymns and carried a black coffin labeled "Polish agriculture."

Later, they stood vigil outside a building where the minister of finance held several hours of talks with farm leaders, who argue that free-market change in Poland is bankrupting small farmers.

The farmers have threatened that unless their demands for minimum prices and low-interest loans are met, they will set up roadblocks around the country beginning Monday.

There was agreement today over low-interest loans, according to Finance Minister Leszek Balcerowicz, but the meeting ended without agreement on prices.

"The government cannot consider the demands of guaranteed minimum prices because it would lead simply to the increase of market prices for food," Balcerowicz said, adding that the government is ready to hold more talks.