CARACAS, Venezuela — Thousands of opposition supporters marched to central Caracas on Saturday, defying a government ban on rallies in the Venezuelan capital’s core and testing a heavy police presence as the country struggled to emerge from its worst blackout in recent memory.

Clashes between the police and protesters were reported early in the day, but a cordon of officers stepped aside to allow the demonstrators to rally and hear from the opposition leader Juan Guaidó.

“We have to conquer public spaces in a peaceful manner,” Mr. Guaidó, standing atop a car, declared through a megaphone. “We have to prepare ourselves for very tough times.”

Power was intermittent in Caracas on Saturday, two days after the country went dark, and it remained off in large portions of the country’s west. Much of the country’s telecommunications network was offline after another power failure on Saturday, according to NetBlocks, an internet monitoring group. State utility workers say it will take days to fully restore the national grid.