Brian Cowen, the Irish prime minister, is facing a triple electoral setback. His Fianna Fail party has lost a swathe of seats in local elections, has failed to win two Dublin by-elections for the Irish parliament, and is on course to lose its Dublin seat in the European parliament elections for the first time.

According to an exit poll by RTE and the Sunday Independent newspaper, Fianna Fail is set to lose its seat in Dublin to either Sinn Fein or the small socialist party, both of which are anti-European.

Analysts said the result showed ordinary Irish using the vote to protest against the harsh economic measures introduced by Cowen and his finance minister Brian Lenihan.

The only consolation is the same exit poll suggest voters’ worries about the economy means they are now more likely to back the European Union’s Lisbon Treaty, with 54 percent now backing Lisbon. Cowen is set to put the treaty, which aims to make the EU institutions more efficient, to the people in October, after Ireland overwhelmingly rejected it in a referendum last June.

Cowen acknowledged the scale of the setback from last week’s votes. But he said: “Sometimes in politics, when you take the necessary decisions you have to put the country first even it means the short term popularity of the party is affected.”

Fianna Fail’s Green party coalition partner was routed in local elections, losing all its city and county council seats in Dublin, its power base and triggering calls from party activists to reconsider its participation in government.

In the local elections, Fianna Fail won 23 percent of the national vote, which if repeated in a general election would see its Dail or parliament representation halved. Fine Gael, the main conservative opposition party, was at 31 percent, with Labor 17 percent, Sinn Fein, the hard nationalist party, on 7 percent, and the Greens at 2 percent.

Fianna Fail’s performance in the two parliamentary by-elections was even worse, polling just 15.8 percent. Fianna Fail failed to hold its parliamentary seat in Dublin South, losing to Fine Gael. Dublin Central returned a left wing independent, with Maurice Ahern, brother of the former Fianna Fail prime minister Bertie Ahern, coming in fifth.

Enda Kenny, the Fine Gael leader, said he would table a vote of no confidence in the government when parliament reconvenes on Tuesday.