Poland's warring president and prime minister have separately marked the 35th anniversary of a key deal between striking workers and communist authorities that opened the way to democracy.

The ceremonies were held Monday in the Baltic port city of Gdansk, where in 1980 the communists agreed to 21 demands by workers that included free trade unions and freedom of speech. The signing ended two weeks of strikes in the Gdansk shipyard and elsewhere and gave rise to the nationwide Solidarity movement, led by Lech Walesa. It took nine years and martial law that outlawed Solidarity from 1981-1983 before Poland became a democracy.

But President Andrzej Duda and Prime Minister Ewa Kopacz, coming from parties that compete ahead of October general elections, attended different observances, amid political differences.