On Wednesday night, three prominent Republican lawmakers made a last-ditch effort to hash out a plan before the Senate's vote to block President Donald Trump's national-emergency declaration.

Republican Sens. Ted Cruz of Texas, Lindsey Graham of South Carolina, and Ben Sasse of Nebraska reportedly gave little to no advanced notice about their trip to the White House, where Trump was having dinner at the time.

The unexpected discussion did not appear to be fruitful.

The White House's chief of legislative affairs, Shahira Knight, reportedly remarked to others that it "probably did more harm than good" and that the encounter annoyed Trump.

Three prominent Republican lawmakers made a last-ditch effort to hash out a plan before the Senate's vote on a resolution condemning President Donald Trump's national-emergency declaration. In doing so, the group interrupted Trump as he was having dinner, according to a Politico report published Thursday.

On the night before the Thursday vote, Republican Sens. Ted Cruz of Texas, Lindsey Graham of South Carolina, and Ben Sasse of Nebraska reportedly gave little to no advanced notice of their White House trip to formulate a plan with Trump.

The three senators, two of them staunch allies of the president, were inclined to distance themselves from the Democrat-supported resolution.

The three lawmakers had "called to say they were on their way and insisting to see the president," a senior White House aide told Politico, and they found Trump eating dinner in the White House dining room. Another official reportedly described them as "trespassers."

The unexpected discussion did not appear to have been fruitful.

Read more: Here's the full text of Trump's national-emergency declaration to build his border wall

After other White House officials were summoned to discuss the coming vote, the senators and Trump appeared to be deadlocked. The White House's chief of legislative affairs, Shahira Knight, reportedly remarked to others that it "probably did more harm than good" and that the encounter annoyed Trump.

The three senators would eventually join the minority in the 59-41 vote. Twelve Republicans broke ranks and voted for the measure, including Sens. Marco Rubio of Florida, Susan Collins of Maine, Mitt Romney of Utah, Rand Paul of Kentucky, and Lisa Murkowski of Alaska.

The bill will now make its way to Trump's desk, where he is widely expected to use his first veto to nix the resolution. White House aides were reportedly planning for Trump to veto the resolution as soon as Friday, according to CNN.

"I look forward to VETOING the just passed Democrat inspired Resolution which would OPEN BORDERS while increasing Crime, Drugs, and Trafficking in our Country," Trump tweeted on Thursday evening. "I thank all of the Strong Republicans who voted to support Border Security and our desperately need WALL!"

The vote was a temporary victory for Democrats, who have long opposed Trump's efforts to divert unspent military funds and use it to build a physical barrier along the US-Mexico border.