Supporters of President Viktor Yanukovych have hustled a sweeping law through parliament to curb anti-government protests, sparking an outcry from the opposition and raising tensions on the streets.
The law, backed by deputies from Yanukovich's Regions Party and allies, also adopted a similar stance to Russia on registration of foreign non-governmental organisations, insisting they should pay taxes on profit.
NGOs that were financed from abroad and took part in political activity would be categorised as "foreign agents", it said.
But the law, which runs to more than 100 pages, appeared directed mainly at preparing the ground for action to end the street protests that have been taking place in the capital, Kiev, and other cities since November.
Yanukovich's refusal at that time to sign a free-trade deal with the European Union in favour of boosting ties with Ukraine's former Soviet master Russia brought hundreds of thousands on to the streets in protest.
Though numbers have dwindled since, several hundred people remain camped out on Kiev's central square or are occupying public buildings such as City Hall. On Sunday, at least 50,000 people demonstrated against Yanukovich in Kiev.
The law, which still needs Yanukovich's signature, bans any unauthorised installation of tents, stages or amplifiers in public places, on pain of a fine of up to US$640 or up to 15 days in detention.
People who provide facilities or equipment for such meetings will be liable to a fine of up US$1,275 or detention of up to 10 days.
Opposition politicians regularly use a stage on the square to broadcast messages to protesters, and the law will clearly make such action illegal.
Other tough but vaguely worded threats envisage jail sentences of two to 15 years for offences involving stopping people entering buildings or "mass violation" of public order. Protest "motorcades" involving more than five vehicles, like those staged outside government residences including that of Yanukovich in recent weeks, were also banned.
The decision in parliament, taken by a sudden show of hands that caught the opposition off-guard, followed a court ban on protests in Kiev, boosting opposition fears of an imminent police crackdown.
"The people of Ukraine have been deprived of civil rights and liberties. According to these laws, standing on the central square is prohibited, setting up tents is prohibited, talking about corrupt judges is prohibited. And many other things are also banned," said boxer-turned-politician Vitaly Klitschko, an opposition leader regarded as a potential strong challenger to Yanukovych for the presidency.
"That is why a change of power and the Yanukovich regime in Ukraine is our main objective."
The law would make it an offence to wear a mask or face-covering like that adopted by many protesters, particularly those from the nationalist parties.
The EU's ambassador to Ukraine, Jan Tombinsky, joined opposition leaders in condemning the way the law was rushed through by a show of hands rather than by the customary electronic voting, a mechanism that opposition deputies can physically block.
"Norms should be adopted through proper procedures, otherwise the credibility of democratic institutions and of the legal system is at stake," he said.
In Washington, the State Department expressed deep concern with the measures, saying it "cast serious doubt on Ukraine's commitment to democratic norms".