Sinn Féin's Pearse Doherty has won the Donegal South West by-election despite not reaching the quota of 17,213.
Mr Doherty polled 16,897 votes to top the poll.
Fianna Fáil's Brian Ó Domhnaill was third with 8,069 votes after Fine Gael's Barry O'Neill got 8,182 votes to move into second place.
The result does not immediately threaten Government plans to pass a tough budget aimed at saving the crippled economy, but the loss for Fianna Fáil raises the political temperature.
Mr Doherty said his win showed the increasing public opposition to the austerity budget and the multi-billion euro bailout planned for Ireland.
“The clear message here is that this government needs to get out of office,” he said.
“And it is not too late for the other parties who claim to care about the disadvantaged in our society to join Sinn Féin in creating a real alternative.”
Speaking after being elected TD for Donegal South West this evening Mr Doherty said: “Today’s result is a vote for change. It is an endorsement of Sinn Féin’s argument that there is a better way.
“It’s a vote for a fair economic policy based on tax reform, ending waste and stimulating the economy to create jobs.
“It’s a rejection of the Government’s four-year plan, of cuts to public services, social welfare and the minimum wage
“It is a rejection of the ‘consensus for cuts’ amongst all the establishment parties – Fianna Fáil, Fine Gael and Labour.
“It is also a rejection of the interference of the IMF in Irish affairs.
“I will, as I have been mandated, vote against the Government’s damaging Budget on December 7.
“The people of Donegal South West have spoken loud and clear. They have voted in favour of policies that will create jobs and support our fishing and farming communities.
“They have demanded an end to the policies that have led to the neglect of this county over the years.
“I will work to see that jobs are delivered and that we have investment in public services including health and education.
“As a Sinn Féin TD I will also work to end partition which has been detrimental to Donegal and to our country North and South.
“I will work towards the democratic goal of Irish unity which more and more people are coming to realise will benefit this country politically, economically and socially.
“My victory today, while a joyous occasion, takes place against the sobering backdrop in Donegal of unemployment, emigration and people struggling to get by. Changing all of that is the challenge which faces us all.
“It is time to change the direction of Irish politics. It is time to end cronyism and corruption and to reform our political institutions.
However, Fianna Fáil Minister Eamon O Cuiv said his party polled better than many would have expected following a black week in Ireland’s political history.
“The bigger picture is that if you study the (larger) opposition parties, they did not make the huge gains predicted,” he said.
Mr O Cuiv congratulated Sinn Féin and suggested they would hold the seat in the general election that the Government has conceded can take place early next year.
But his contention that Sinn Féin benefited in part from a protest vote was challenged by Mr Doherty.
“This government is in denial,” said the winning candidate, who was flanked by his wife Roisin and his party leader Gerry Adams.
“It was in denial last week over the arrival of the IMF. It is still in denial.
“This is the start of a new beginning in Irish politics.”
The by-election was held against a backdrop of continuing talks between the Government and the EU/IMF over an €85bn rescue package to bail out the economy.
But Mr Doherty said his party opposed seeing “sovereignty” over fiscal decisions passing into outside hands.
Donegal South West is a rural area where people believe they largely missed out on many of the benefits of the Celtic Tiger economic boom. Communities have been hit recently by high unemployment and emigration.
The seat in the Dáil became vacant 18 months ago when Fianna Fáil’s Pat “The Cope” Gallagher was elected an MEP.
Mr Doherty launched a successful legal challenge that recently forced the Government to hold the delayed by-election.
The stage seemed set for a defeat for Fianna Fáil but with the contest taking place in one of its heartlands observers were reluctant to rule out a win against the odds.
That caution was rocked by today’s first preference votes that confirmed a major drop in the support for Fianna Fail.
In the last general election in 2007 the levels of support showed Fine Gael at 23%, Sinn Féin at 21% and Labour at under 3%.
Today Labour increased its standing with 10%, but was expected to do better. Fine Gael took 19%.
Sinn Féin now has five representatives in the Dáil.
The party will use the victory to help build its strength.
Mr Adams, who will fight for a Dail seat in Louth in the general election, said: “Pearse will join the Sinn Féin team in Leinster House in acting as the only effective opposition party determined to oppose the IMF-imposed budget.”
Turnout for the by election was put at 56%.
Pearse Doherty (SF) 16,897
Brian Ó'Domhall (FF) 8,069
Barry O'Neill (FG) 8,182