After his failed bid to oust Mr Cowen as leader of Fianna Fáil, Mr Martin congratulated his opponent in front of party members and said the Taoiseach would have full party support.
Some 18 TDs gave their views in the meeting, which lasted around three hours.
The atmosphere was described as relatively polite and less confrontational than some had expected.
Votes were cast by secret ballot shortly before nine o’clock. They were taken into a separate room where they were counted and shredded, ensuring the precise result will not be known.
Supporters of the Taoiseach privately claimed a decisive victory of around 50 to 20 votes. But some supporters of Mr Martin believed Mr Cowen won by a narrow margin of around 37 votes to 34.
Mr Martin spoke for around 10 minutes at the start of the meeting. When the vote was over he congratulated the Taoiseach before penning a letter of resignation as Foreign Affairs Minister, a position he has held for almost three years.
Tourism Minister Mary Hanafin was the only other minister who did not publicly back the Taoiseach.
She surprised many TDs in last night’s meeting by making a very brief speech in which she said she had made her position known privately to the Taoiseach and would be voting accordingly.
Before meeting him last Friday, Ms Hanafin, believed to have been an ally of Mr Martin, refused to express confidence in Mr Cowen.
Finance Minister Brian Lenihan, who declared his last-minute support for the Taoiseach, did not speak at last night’s meeting.
During the meeting, he was criticised by a backbencher for his comments in a radio interview earlier in which he said he had never sought support for a heave against Mr Cowen.
The Taoiseach’s victory in last night’s confidence vote came after what was described as a rousing 10- minute speech at the end of the meeting, but which failed to win him a standing ovation.
He made a longer contribution at the start of the meeting about plans for Fianna Fáil’s fight in the general election.
Those who spoke in his favour included Galway East TD Noel Treacy, Waterford TD Brendan Kenneally and Dublin South Central TD Michael Mulcahy.
Those who spoke against the Taoiseach were Cork North Central TDs Noel O’Flynn and Billy Kelleher as well as Kildare South TD Sean Power.
Mr Martin gave what was described as an “impassioned speech” about Fianna Fáil’s current credibility and his long-term vision for the party. After the vote, he told TDs they should unite behind the party effort in the next general election.
According to party whip John Curran, Mr Martin said the result “brings an end to this issue”.