Poland is marking the 25th anniversary of the former communist government's attempt to crush the opposition Solidarity movement.
Poles recreated events of the night of 12-13 December 1981
Polish President Lech Kaczynski awarded national honours to former democratic activists who opposed the regime.
Tens of thousands of people were arrested without charge and as many as 100 were killed in the crackdown that began on 13 December 1981.
But martial law failed and marked the start of the end for Polish communism.
President Kaczynski was among those arrested and spent 10 months in jail.
He said that "even considering communist law, what happened the night of 12-13 December was illegal".
"It was the illegal internment of thousands of people."
Mr Kaczynski said that Poland's battle for freedom "lasted a long time... but it ended in a great victory".
Taken by surprise
Religious services were held to mark the anniversary.
Mr Kaczynski's twin brother, Prime Minister Jaroslaw Kaczynski, laid a wreath at the grave of Father Jerzy Popieluszko, who was killed by the communist secret police, in a church in Warsaw.
There were also exhibitions and a reconstruction of street fighting between opposition activists and communist militia.
The imposition of martial law took almost everyone by surprise, says the BBC's Adam Easton in Warsaw.
Martial law did not stem the rapid growth of the Solidarity movement
Many of Solidarity's leaders were arrested in their beds on the first night.
In the morning, hundreds of thousands of soldiers and tanks patrolled the streets.
Poland's Communist Party leader, General Wojciech Jaruzelski, acted after some Solidarity leaders were secretly taped calling for free elections.
And little more than a year after its foundation, Solidarity had grown into a nationwide movement with 10 million members.
The general says he declared martial law to prevent a Soviet invasion like the earlier interventions in Hungary and Czechoslovakia.
He is now facing charges in connection with the crackdown.