WARSAW, Poland (AP) _ Police wielding riot sticks attacked 1,000 anti-government demonstrators who rallied in Krakow to mark the anniversary of Poland's 1791 democratic constitution, opposition sources said.

Police also dispersed demonstrators Sunday in Warsaw, the southwestern city of Wroclaw and the eastern city of Lodz, but no violence was reported in those cities.

Opposition sources said more than 150 people were detained during the four demonstrations. It could not be learned immediately if there were any injuries in Krakow.

Poland celebrated the May 3 anniversary as a national holiday before the Communist government came to power after World War II. Protesters have rallied against the government on that date since the now-outlawed Solidarity labor movement began in 1980.

In Krakow, more than 100 people were reported detained at a rally called by the Confederation for Independent Poland, an anti-communist group the government has declared illegal.

At least 5,000 people attended the one-hour rally at historic Wawel Castle, unfurling banners and listening to a speech calling for a free Poland, said Zygmunt Lenyk, a human-rights activist in Krakow.

Several protesters were beaten when police attacked about 1,000 people marching after the rally, Lenyk said in a telephone interview. He said police and protesters had many running battles, and several demonstrators were detained.

In Warsaw, riot police dispersed without force about 1,000 people who changed, ''No freedom without Solidarity'' and other union slogans outside St. John's Cathedral in the city's Old Town district.

The demonstration followed a Mass marking the May 3 anniversary that was attended by an overflow crowd of 5,000.

Riot police with loudspeakers told the crowd to disperse and cordoned off the street in front of the church to prevent a march. They chased several hundred people back into the church, but priests later escorted the people through police lines.

At least a dozen people were detained, including a CBS television crew from New York and a Canadian television crew.

In Wroclaw, police dispersed a march by several hundred people and arrested 40 after a Mass, but there was no violence, said Jozef Pinior, a Solidarity activist in the city.

At least three people were reported detained in Lodz when police broke up a march by several hundred people after a Mass, opposition sources in the city said.

Under Polish law, people can be detained for up to 48 hours without charges. Since declaring an amnesty for political prisoners last September, the authorities have avoided jailing people on political charges.

Most Solidarity leaders detained for anti-government May Day demonstrations on Friday were released within 24 hours, including former underground leaders Zbigniew Bujak, Wladyslaw Frasyniuk and Janusz Onyszkiewicz, Solidarity's national spokesman.

Frasyniuk and several other Solidarity members were convicted in misdemeanor trials on charges of heading an illegal demonstration or disturbing the peace, opposition members said.

They were fined up to $210, twice the average monthly salary, according to the opposition members.

Solidarity, founded during a series of strikes, was the first free union movement in the Soviet bloc. It was suspended when the government imposed martial law in December 1981, and later was outlawed.