Prime Minister Alexis Tsipras faced a revolt from his own party inside the Greek parliament, while a pitched battle raged outside in Syntagma Square.

Sweeping austerity measures demanded by lenders to open talks on a new multibillion-euro bailout package to keep Greece in the euro were passed, but dozens of hardliners in the ruling Syriza party deserted Tsipras.

Tsipras won 229 out of the 300 parliamentary votes in favour of the agreement he struck on Monday with eurozone partners on austerity measures and economic reforms tougher than those rejected by voters in a 5 July referendum. However, 32 of Syriza's 149 MPs voted against the plan, six effectively abstained and one was absent, leaving the government without a majority of its own supporters.

Among the Syriza rebels was former finance minister Yanis Varoufakis, who compared the deal to the 1919 Versailles Treaty that imposed unpayable reparations on a defeated Germany after the First World War. Energy minister Panagiotis Lafazanis and deputy labour Minister Dimitris Stratoulis also voted against the package.

Tsipras told parliament he had accepted a package he did not believe in and which would harm Greece, but the only alternative was a disorderly bankruptcy that would be more catastrophic. "I acknowledge the fiscal measures are harsh, that they won't benefit the Greek economy, but I'm forced to accept them," he said before the vote.

Protesters threw petrol bombs at police in front of parliament, in some of the most violent scenes in over two years.

Black-clad protesters smashed shop windows and cash machines, set fire to rubbish bins, cars and a van belonging to a television station.

Once a common sight in Greece, clashes with police had been very rare since the leftist Syriza party came to power in January.