Tens of thousands of protesters gathered in Prague on Saturday for an anti-government rally as the centre-right ruling coalition was teetering on the verge of collapse.

Unions, pensioners, student associations and other groups angered by austerity cuts and graft scandals teamed up for what they said would be the biggest protest yet against the cabinet of right-wing leader Petr Necas.

"I'm fed up with this government. It doesn't do anything for ordinary people," Jana Sizlingova, a visibly angry pensioner from Prague, told AFP as she marched to the central Wenceslas Square with other protesters.

"I'm upset with corruption, non-transparent procurement, the health system, the social system -- simply, there's nothing good about this government," she added.

The protest comes as the cabinet, in power since mid-2010, is scrambling for a parliamentary majority following the split-up of a junior coalition party this week.

The government -- comprised of Necas' right-wing Civic Democrats, the rightist TOP 09 and the centrist Public Affairs parties -- had 118 seats in the 200-seat parliament when it took office.

But scandals including graft have gradually cut the number of Public Affairs lawmakers from the original 24, and vice-premier Karolina Peake's decision to leave the party on Tuesday dealt it another blow.

Prime Minister Necas gave Peake until Monday to win the support of at least nine lawmakers to secure a parliamentary majority, but he also warned of possible snap elections in June, which would likely see Public Affairs out of the parliament.

Recent surveys showed the leftist opposition Social Democrats would dominate the vote ahead of the Communist Party, while Necas's Civic Democrats would slump to the third place.

The ex-communist Czech Republic, a country of 10.5 million, joined the EU in 2004.