Taoiseach Brian Cowen has won the vote of confidence in his leadership of Fianna Fáil.
71 TDs were eligible to vote in the secret ballot at this evening's meeting of the parliamentary party.
The Taoiseach told RTÉ News he was happy with the outcome and said he will lead a party determined to face into the upcoming electoral contest.
Mr Cowen said he had no intention of seeking resignations and that his friendship with Michael Martin had not been affected.
However Mr Martin, who had opposed the motion, later tendered his resignation as Minister for Foreign Affairs.
Brian Cowen said he would be reluctantly accepting Mr Martin's resignation.
Michael Martin now returns to the backbenches after serving in several ministries - tonight he thanked those he had worked with during that time.
After the meeting, Fianna Fáil Chief Whip John Curran insisted the party is united behind its leader.
Timeline: As it happened
22.50 David McCullagh: With his wife Mary by his side, the Taoiseach posed for a celebratory photocall tonight at Government Buildings, secure once more in his leadership of Fianna Fáil.
The breakdown of the vote wasn't announced, but the official view is that the matter is now closed.
22.41 Watch Micheál Martin's full statement (+ questions) outside Leinster House
22.17 Sean Ó Fearghail, Kathleen Lynch, Pat Leahy, Alison Leahy, David Cochrane on Late Debate on RTÉ Radio 1 - Listen live
22.10 Asked by Miriam O'Callaghan if he was embarrassed about the current economic problems under Fianna Fáil government, Darragh Calleary says: 'I would be 'a lot more embarrassed we had avoided the difficult decisions.'
'This wasn't an old-style leadership battle'
22.01 In a statement, the Green Party said its TDs and Senators had discussed the outcome of the Fianna Fail vote.
'We hope this process has now delivered a definitive outcome.'
2156 Prime Time (watch live here) is reporting that Mary Hanafin voted against Brian Cowen.
21.40 'One has to make a stand' Micheál Martin tells reporters at Leinster House.
'I came to my personal conclusion after Christmas that a certain course of action had to be taken. One has to make a stand. One has to force the issue.'
'It has been a very healthy debate and good debate.'
Mr Martin said it was an honour to have served in cabinet and he praised those with whom he had worked during his tenure as Minister.
He said the party is 'united behind the leader' and Mr Cowen will have the party's full support in the forthcoming general election campaign.
21.29 Taoiseach Brian Cowen tells RTÉ News that he has accepted the resignation of Micheál Martin as Minister for Foreign Affairs.
He insisted the leadership issue has not affected his friendship with Micheál Martin.
Brian Cowen said he was 'happy' with the confidence shown in him.
He said the Government has a four year plan to revive the country and 'it's never the wrong time to do the right thing.'
He thanked Micheal Martin and said he will seek to use his talents in the election.
21.24 Party Whip John Curran says tonight's result and victory for Brian Cowen 'brings an end to this issue'.
He says Micheál Martin's future was not discussed. 'It wasn't an issue for tonight's meeting.'
Mr Curran disagreed that Mr Cowen had been weakened by the leadership issue of recent days.
21.21 Tonight's vote has been welcomed in the Taoiseach's constituency in Co Offaly, says Midlands Correspondent Ciaran Mullooly.
21.19 'The party has always been united,' Ned O'Keeffe tells David Davin Power on Nine News
21.17 Awaiting news of official result at the plinth outside Leinster House from John Curran
21.10 Brian Cowen wins confidence vote.
21.05 David Davin-Power: Once there is a result it will be delivered by Chief Whip John Curran.
20.55 Micheál Martin is said to have given a strong speech - Mary Hanafin is believed to have given a surprisingly short address to the meeting.
20.53 After more than three hours, and having heard contributions from a range of Fianna Fáil members, the Taoiseach wrapped up the meeting with a speech shortly after 8.40pm.
The TDs who are entitled to vote had their names called from a list and cast their votes - one vote, that of Justice Minister Dermot Ahern - was cast from his hospital bed were he is recovering following an operation.
The two tellers are Dr Rory O Hanlon and Michael Moynihan; the votes will be shredded after they are counted.
20.52 A result of the secret ballot is expected shortly.
20.48 Voting in the confidence motion is under way.
20.46 David McCullagh: Leinster House has seen plenty of leadership challenges - though tonight's confidence debate seemed relatively civilised.
20.34 The Taoiseach is now speaking ahead of a confidence vote at the meeting.
The secret ballot will take some time but a result could come within half an hour.
20.33 Brian Dowling: Some sources saying the Taoiseach is now wrapping up the discussion
20.15 It is believed that around 20 members of the party have spoken at tonight's meeting.
19.55 David Davin-Power: About 12 people have spoken now at the Fianna Fáil parliamentary party meeting.
19.42 It is understood Mary Hanafin told colleagues she would be 'voting in accordance with the conversations she had had with the Taoiseach'
19.38 The latest estimate is that about eight have spoken at the Fianna Fáil parliamentary party meeting
19.29 David Davin-Power: 'Plenty of talking left at FF meeting i hear.'
19.25 The Taoiseach spoke for around 20 minutes.
19.20 David McCullagh: It is understood Brian Cowen addressed criticism of the preparedness of the FF organisation for for the general election and the issue of morale within FF
19.17 One supporter of Mr Cowen described Micheál Martin's ten minute speech as 'brilliant'
19.04 Brian Dowling: Sources say Cowen & Martin have completed their opening comments. Jr minister Billy Kelleher was speaking in support of Martin when the meeting broke
19.03 The Fianna Fáil PP meeting has broken up for a Dáil vote and will resume in around 10 minutes
18.31 Irish Times' Stephen Collins tells RTÉ's that it looks as if the majority of FF TDs will stay with Cowen as they don't want uncertainty
18.26 Fianna Fáil TD Charlie O'Connor says the Taoiseach is addressing the PP meeting and he was buoyed by what Cowen had to say
17.06 Tonight's confidence motion will be proposed by the Taoiseach and seconded by Tánaiste Mary Coughlan