Under the terms of the deal, workers are also promised pay rises, better food supplies and improved social services.

Rousing reception

The deal was announced to the crowds of shipyard workers who had gathered outside the talks in Gdansk to polite applause.

Their leader Mr Walesa received a rousing reception. He was hoisted onto the shoulders of cheering workers with his arms raised in triumph.

Today's agreement comes after a summer of industrial unrest in Poland and at the end of the latest 18-day stoppage which has affected hundreds of businesses along the northern coast, as well as key industrial areas in the south of the country.

Latest estimates said some 150,000 workers had downed tools and there were signs Warsaw was about to be paralysed by a general strike.

It was the most serious crisis threatening the government since the food-price riots that toppled party leader Wladyslaw Gomulka in 1970.

But this time the striking workers went far beyond demanding price reductions - they also demanded political change.

As well as the freedom to strike and free trade unions, they also wanted the abolition of censorship and freedom for all political prisoners.

The wave of industrial unrest began eight weeks ago with a series of scattered strikes protesting a sudden rise in meat prices, which had been kept artificially low by government subsidies.

When the government refused to back down over the price of meat, 16,000 employees of the Lenin Shipyard in Gdansk walked off the job and seized control of the yard.

They were joined by other factory workers and between them managed to virtually shut down the country's major Baltic seaport.

Attempts to split the strikers by agreeing some concessions including a pay rise for the shipyard workers and the reinstatement of a militant colleague, Anna Walentinowicz, failed.

The industrial unrest continued to grow. The strikers established the "Interfactory Strike Committee" and quickly adopted Lech Walesa as their leader.

In Context
The deal for independent trade unions and the right to strike was signed the following day by Lech Walesa and Mieczyslaw Jagielski.

In September the first independent trade union, Solidarity, was formed under the leadership of Lech Walesa.

But the Polish regime imposed martial law in December 1981 and the union's leadership, including Mr Walesa, was imprisoned.

He was released in 1982 and awarded the Nobel peace prize in 1983.

Economic conditions worsened in Poland and the government was eventually forced to negotiate with Solidarity.

The result was partially free elections and a non-communist coalition government including Solidarity.

Mr Walesa became the elected president of Poland in 1990, a post he held until he was defeated in elections in 1995.