KYIV, Ukraine -- Ukraine's parliament on Wednesday passed a measure offering amnesty to those arrested in two months of protests, but only if demonstrators vacate most of the buildings they occupy. The move was quickly greeted with contempt by the opposition.

The measure was put forth by a lawmaker from the party of President Viktor Yanukovych, who is casting about for a way to end the protests, which are calling for his resignation. The measure was a softer version of an earlier proposal to only offer amnesty if all protests dispersed.

But the opposition regards the arrests during the protests -- 328 by one lawmaker's count -- as fundamentally illegitimate.

"In reality, parliament has just passed a law on hostages. The authorities have themselves recognized that they are taking hostages, as terrorists so they can trade the hostages," said Oleh Tyahnybok, leader of the Svoboda party and one of the protests' top figures, according to the Interfax news agency.

That disdain was echoed in Kyiv's central Independence Square, where protesters have set up a large tent camp and conducted round-the-clock demonstrations since early December.

"Is this a compromise, or are these political prisoners," said 30-year-old demonstrator Artem Sharai. "We will seize new buildings, if the authorities don't really change the situation in the country."

Protesters are demanding Yanukovych's resignation, early elections and the firing of authorities responsible for violent police dispersals of demonstrators. The protests started after Yanukovych backed out of a long-awaited agreement to deepen ties with the European Union, but quickly came to encompass a wide array of discontent over corruption, heavy-handed police and dubious courts.

Three demonstrators died in clashes with police last week, as anger boiled up over harsh anti-protest laws that Yanukovych pushed through this month. Parliament voted on Tuesday to repeal those laws, but Yanukovych has not signed the measure.

The bill would not apply to several city buildings in the centre of Kyiv which the protesters use as dormitories and operation centres, and are key support facilities for the extensive protest tent camp on the main square. With temperatures dropping as low as -20 Celsius (-4 Fahrenheit) during the night, continuing the protests without places to shelter would be virtually impossible.

But the Kyiv city hall building, as well as regional administration ones seized by protesters in western Ukrainian cities, will have to be vacated, according to the Unian news agency.

Given how the violent dispersal of demonstrators in December only swelled the Kyiv protests and how the new laws spread discontent outside the capital, Yanukovych may have recognized that using force would set off severe new trouble and appears to be fishing around for measures to mollify the opposition without giving serious ground.

Along with proposing that parliament repeal the new laws, he also has accepted the resignation of the prime minister, one of the figures most despised by the opposition. But there have been no signs of compromise on the root issues of the protests.

Meanwhile, there are growing concerns about dissension between radicals and moderates within the broad-based protest movement.

Earlier Wednesday, one group of protesters clashed with another in bid to free a government building that they had seized in Kyiv. At least two protesters were injured.

Andriy Khoronets, an activist with the Svoboda party which represents more moderate protesters, tried to force members of the more militant Spilna Sprava group to vacate the Agriculture Ministry building as part of a compromise with the government.

"We must be seen as people who can fulfil one's obligations," Khoronets told The Associated Press outside the building. "There should be no anarchy."

The protests erupted after Yanukovych turned down a deal in November with the European Union in favour of getting a $15 billion bailout from Russia, but they have since shifted to demanding more human rights, less corruption and more democracy in this nation of 45 million.