WARSAW, MAY 25 -- Solidarity leader Lech Walesa said today that a week-old strike by railway workers, which has spread to block all of Poland's ports, was fueled by political intrigues and could flare into civil war.

Prime Minister Tadeusz Mazowiecki said the strikers are threatening Poland's new democracy and that meeting their demands would spell suicide for the economy.

The strike is the most dangerous challenge yet to the government formed by Solidarity nine months ago and the first protest against the tough economic policies it launched Jan. 1 to curb inflation and introduce a free-market economy.

Mazowiecki told a local election rally in Wroclaw that his government refuses to undermine its economic austerity measures by caving in to the strikers' demands for a 20 percent wage increase. "That would be a suicidal road leading to the revival of inflation and wasting society's huge effort of the last months," he said.

The strikes "constitute, probably against the will of the strikers, a threat to our newly born democracy," Mazowiecki said. "If they keep only their own interests in mind, blind to the needs of the country, that will be a defeat for democracy, a defeat for Poland."

Walesa accused activists of the former ruling Communist Party of using the workers' genuine grievances for their own political ends.

"Those who have left the country in ruins are today exploiting a legitimate workers' protest for their vile game and this may lead to civil war," he told reporters at Solidarity's headquarters in Gdansk.

Walesa called off a planned visit to Scandinavia and a government spokesman said he did not rule out the possibility that Mazowiecki might postpone a visit to Paris on Monday.

As the strike spread today all Polish ports were blocked, almost one-third of the country was without rail transportion and most coal exports had halted, railway spokesman Jacek Wnukowski said.

Wnukowski said signalmen had blocked a junction near the Baltic coast, cutting off the ports of Gdynia and Gdansk from the rest of the country. Poland's biggest port complex of Szczecin-Swinoujscie has been closed for three days.

A Foreign Trade Ministry spokesman said, however, that he had no information that exports had stopped. Coal is Poland's main hard currency earner, providing 8 percent of its export revenues -- at least twice as much as any other item. In 1989 Poland exported 28.8 million tons.

Meanwhile, hunger strikers in the coastal city of Slupsk, whose two-week action sparked the rail protest, said they were suspending their fast.