BUDAPEST — The government and the opposition held rival rallies in downtown Budapest on Thursday, using the anniversary of the 1848 uprising against Hapsburg rule to stake out their positions in the politically fractured Hungary of today.

The official government commemoration and a rally organized by Milla, a civic group, both attracted tens of thousands of people on a sunny national holiday. The competing rallies were a broad measure of feelings for and against Prime Minister Viktor Orban.

Hungary has been under increased pressure from the European Union because of some of Mr. Orban’s policies, with critics saying he has eroded the country’s hard-won democracy during his nearly two years in power and the European Commission threatening legal action over some laws he and his allies have approved. He has also come under fire for his management of the economy.

On Thursday, Mr. Orban, who leans conservative, gave a defiant speech to an estimated 100,000 supporters who chanted “Viktor, Viktor” outside the ornate Parliament building, a landmark on the Danube River that cleaves Buda from Pest, the two halves of the capital.