Police fought an hour-long battle with demonstrators here today after Solidarity leader Lech Walesa was forcibly prevented from laying a wreath at a monument to workers killed 14 years ago by government forces.

In the sharpest clash seen in this northern city for a year, helmeted militiamen charged a crowd of about 3,000 attempting to march half a mile with Walesa from St. Brigit's Church to the memorial, which towers above the gates of the Lenin Shipyard, birthplace of the outlawed Solidarity union.

Walesa, locking arms with other leading Solidarity figures, managed at first to push through two skirmish lines of police in a drive toward the monument. But as police trucks closed in to block his path, he placed the wreath he was carrying at the feet of a phalanx of militiamen and withdrew. There were no immediate reports of injuries.

The police response was surprising in view of past decisions by communist authorities allowing Walesa to place flowers at the shipyard monument on important opposition anniversaries. But tensions are high this year over the October slaying by secret police officers of the Rev. Jerzy Popieluszko, a patron of the Solidarity movement.

Today, state officials seemed determined to show force and make no gesture of tolerance to the political opposition.

[The Associated Press quoted the official news agency PAP as saying that an hour after the "street riot" by 3,000, "there was order in the streets of Gdansk."]

"We went as far as seemed logical and reasonable," the Nobel Prize-winning unionist told reporters afterward. "At some point it wasn't reasonable, so I told people to stop. I put the flowers at the feet of the peoples' authorities and decided to return."

Police lobbed tear-gas grenades into the crowd to disperse it and fired jets of water from a large green water cannon at youths hurling stones.

Protesters jeered "Gestapo," "Murderers" and "Down with commies," and threw coins in a derisive gesture to suggest that the militia would do anything for money.

When marchers refused to break up, police rushed in from several sides, sending protesters fleeing for refuge back into St. Brigit's, where a christening service was in progress. Militiamen chased down some demonstrators in the church parking lot and outside a hotel nearby, kicking and beating people with long, hard-rubber clubs and shoving them into detention vans.

Walesa was let through police cordons on Aug. 31, 1983, and not impeded either on Aug. 31 this year, the anniversary of the shipyard strike in 1980 that led to the formation of Solidarity. Walesa's wife Danuta was permitted on Dec. 16 last year to lay a wreath.

This hard-line stance was an affront to Walesa, whose appeals for restraint and calm in recent weeks are widely considered to have contributed to Poland staying relatively quiet after the announcement of Popieluszko's kidnaping and death.

Today's anniversary was an especially solemn one for Walesa and other residents of Gdansk, where in 1970 workers were shot by government troops in a protest that spread along the Baltic Coast over a rise in food prices announced before Christmas.

Officially, the dead then numbered 27 workers and police officers, but Poles here long have claimed that the toll reached several score. One of Solidarity's first projects, after the union was established in 1980, was to construct a memorial to those killed in 1970.

It consists of three giant, rough-steel beams topped by crosses -- symbols of suffering, hope and struggle. In reliefs at the base are scenes of Poles at work. One includes a Solidarity sign. The monument was dedicated in December 1980 at a ceremony attended by high-ranking government and communist party officials side-by-side with Solidarity leaders.

Solidarity notables traveled from other parts of Poland today to participate in a morning mass attended by 8,000 remembering the dead. Jozef Pinior and Karol Modzelewski came from Wroclaw, Grzegorz Palka from Lodz and Marian Jurczyk from Szczecin.

Joining Walesa from the Gdansk region Solidarity leadership were Andrzej Gwiazda and Bogdan Lis, freed from prison last week after the government dropped a treason charge against him. Both Gwiazda and Palka were detained briefly by police during the demonstration.

The Rev. Henryk Jankowski, pastor of St. Brigit's and a spiritual adviser to Walesa, devoted his sermon to Poles killed, jailed and oppressed in recent years.

"Our victory," he said, "is a victory over ourselves, over the evil inside man, the evil that tells him to impose and kill other people, impose his own life style and feelings, take away his natural rights and trample them."

In an aside later infused with irony by the police action, Jankowski noted that official Polish maps now show the name "Solidarity Square" for the area outside the shipyard where the monument stands.

[In another development, Reuter quoted the state radio as saying students who occupied their school for two weeks in Wloszczowa, 150 miles south of Warsaw, to protest the removal of crosses from their classrooms had ended their protest.]