A Democratic lawmaker from Texas left the hospital briefly to cast a crucial vote against the impeachment of the homeland security secretary.
Al Green surprised House members when he entered the chamber in a wheelchair while wearing hospital scrubs.
The 76-year-old’s trip from the emergency room, where he was having abdominal surgery, proved decisive.
House Republicans ultimately failed to impeach Alejandro Mayorkas with the final tally at 216-214.
Mr Mayorkas is blamed by Republicans for a record surge in illegal immigration at the US southern border.
Mr Green, who has served as a House representative for the 9th district of Texas since 2005, asked his doctors whether he could leave the hospital momentarily to cast his vote. He later had transportation arranged for him by Democratic Minority Leader Hakeem Jeffries.
After arriving at the Capitol, Mr Green’s vitals were checked by an attending physician.
In an unexpected twist for Republicans who were calculating that they had enough votes to pass the measure, Mr Green rolled onto the House floor in a wheelchair. He then cast the tie vote, which caused an uproar and prompted Democrats to yell “order”.
For some lawmakers, though, Mr Green’s appearance was expected. House Minority Whip Katherine Clark told CNN “it was not a surprise”.
Mr Green told NBC News that leaving the emergency room after surgery is “not easy”.
But, he said, “I had to be here”.
The longtime Texas congressman emphasised that view in an interview with the New York Times from his hospital bed after the vote.
He said he was determined to cast his vote but did not anticipate how closely divided the House was going to be on the impeachment.
“I didn’t come assuming that my vote was going to make a difference,” Mr Green said. “I came because it was personal.”
Mr Green said he believed Mr Mayorkas is a “good, decent man whose reputation should not be besmirched”.
Opponents of US President Joe Biden have blamed Mr Mayorkas for a surge in illegal immigration at the US-Mexico border.
The impeachment proceedings were initiated by Marjorie Taylor Greene, a Georgia Republican, and after the vote she said she would try for another.
She also accused Democrats of playing a “game” for not revealing earlier that Mr Green would cast a vote despite being in hospital.
“They hid one of their members, waiting to the last minute, watching to see our votes, trying to throw us off,” she told reporters after the vote.
There were three Republican defectors that also voted “no” along with House Democrats. A fourth, Blake Moore of Utah, switched his vote from yes to no, as a procedural manoeuvre.
Mr Green denied Democrats had played games with his vote and said he was happy to now focus on his health.