House Republicans were dealt a crushing defeat on Tuesday when a months-long effort to impeach Homeland Security Secretary Alejandro Mayorkas over his handling of the crisis at the southern border failed — with three GOP lawmakers breaking ranks and voting against the measure.

The vote was 214-216. Lawmakers voted on a resolution combining two articles of impeachment that accused Mayorkas of having "refused to comply with Federal immigration laws" and the other of having violated "public trust." 

While the House voted mostly along party lines, with Democrats remaining united against the measure, three Republicans voted against it, with another lawmaker switching his vote at the last minute to allow for the resolution to be brought back to the floor.

THE HITCHHIKER'S GUIDE TO WHY REP. BLAKE MOORE FLIPPED FROM YEA TO NAY ON IMPEACHING MAYORKAS

McClintock, Gallagher and Buck split image

From left: Reps. Tom McClintock, R-Calif.; Mike Gallagher, R-Wis.; and Ken Buck, R-Colo. (Getty Images)

Those who voted no were Reps. Tom McClintock, R-Calif.; Ken Buck, R-Colo.; and Mike Gallagher, R-Wis. The lawmakers said while they disapproved of the job Mayorkas is doing at the southern border, the threshold for impeachment had not been met, and warned it could be used against future Republican administrations.

"Secretary Mayorkas is guilty of maladministration of our immigration laws on a cosmic scale. But we know that’s not grounds for impeachment, because the American Founders specifically rejected it," McClintock said on the House floor. "They didn’t want political disputes to become impeachment because that would shatter the separation of powers that vests the enforcement of the laws with the president, no matter how bad a job he does."

Gallagher said Mayorkas "has faithfully implemented President Biden’s open border policies and helped create the dangerous crisis at the southern border." 

"But the proponents of impeachment failed to make the argument as to how his stunning incompetence meets the impeachment threshold Republicans outlined while defending former President Trump," he said in a statement, warning that a lower standard wouldn’t secure the border, "and will set a dangerous new precedent that will be weaponized against future Republican administrations."

HOUSE FAILS TO IMPEACH DHS SECRETARY ALEJANDRO MAYORKAS IN MAJOR BLOW TO GOP 

Mike Gallagher at House Select China Committee

Rep. Mike Gallagher, R-Wis., listens during a hearing of a special House committee dedicated to countering China, on Capitol Hill in Washington, D.C., on Feb. 28, 2023. (AP Photo/Alex Brandon)

Buck was also critical of Mayorkas but did not believe the standard for impeachment had been met.

"In effect, we are now doing what we rightfully said House Democrats were doing in 2019 and 2021: pushing a partisan impeachment not based on what the Constitution actually states," he said in an op-ed for the Hill.

Meanwhile, Rep. Blake Moore, R-Utah, technically voted no but switched his vote at the last minute in a procedural move to be able to bring the resolution back to the floor.

The defeat marks a significant blow for House Republicans, who had pushed the impeachment of Mayorkas for over a year, and have accused him of disregarding federal law with "open border policies" that have worsened the ongoing crisis at the southern border.

GOP LAWMAKER ON KEY IMMIGRATION SUBCOMMITTEE SLAMS MAYORKAS IMPEACHMENT

Democrats and the Department of Homeland Security (DHS) accused Republicans of running a politically motivated impeachment that had no constitutional basis.

"This baseless impeachment should never have moved forward; it faces bipartisan opposition and legal experts resoundingly say it is unconstitutional," DHS spokesperson Mia Ehrenberg said after the vote on Tuesday. "If House Republicans are serious about border security, they should abandon these political games and instead support the bipartisan national security agreement in the Senate to get DHS the enforcement resources we need."

"Secretary Mayorkas remains focused on working across the aisle to promote real solutions at the border and keep our country safe," she said.

CLICK TO GET THE FOX NEWS APP

Republicans, however, indicated that they would likely vote again on the resolution when Rep. Steve Scalise, R-La., returns from cancer treatment.

"While I’m disappointed in the outcome of today’s vote, this is not the end of our efforts to hold Secretary Mayorkas accountable," House Homeland Security Chair Mark Green, R-Tenn., said in a statement. "I look forward to Leader Scalise’s return."

Fox News' Elizabeth Elkind and Chad Pergram contributed to this report.