Greece's parliament has elected a conservative law professor and veteran politician as the country's new president, after he received support from the new left-wing government and main center-right opposition party.

Prokopis Pavlopoulos' election Wednesday ends an impasse over the presidential selection that triggered early general elections last month.

Pavlopoulos, 64, was seen as a surprise choice, as conservative European Commissioner Dimitris Avramopoulos had widely been considered the front-runner for the largely ceremonial post.

The vote was held at Greece struggles to revise a bailout deal in negotiations with Eurozone rescue lenders that had rekindled fears that the country could lose its place in the single currency.