The drama provided an eloquent snapshot of the political forces over immigration tearing at the cohesion of the Republican Party.
Down by the border, Trump was in outsized form, firing off his dubious claims on immigration while torching Democrats with fierce new attacks on climate change and abortion.
In Washington, under the Capitol dome, Republican lawmakers worked diligently with those same Democrats on the kind of institutional Washington compromise that anchors the conventional politics Trump disdains.
It was not clear what will happen next. But with Trump reveling in the embrace of his adoring, partisan crowd, it's quite possible that he returned to the White House with his base-baiting instincts replenished.
In his hour-and-15-minute address, Trump excoriated Democrats and repeated false claims that the nearby wall had meant huge cuts in the city's violent crime. But the President told the audience he had chosen not to learn the details of a bipartisan deal to avert a shutdown before he clambered onstage. If he actually did know full well what was going on, then he couldn't bring himself to describe what on paper appears to be a huge disappointment.
That in itself was a hint that there was no famous victory to crow about and that the agreement reached in Washington -- which contains only $1.375 billion for barriers and no wall -- falls well short of the President's demands for $5.7 billion to fund a campaign promise that has an almost mystical hold on his base.
He might have dodged the question on Monday night -- but Washington is waiting for an answer. What will the President do next?
Will he tear up the congressional agreement and stand with his most loyal supporters by refusing to cave on the wall? Or will he accept the compromise,which could prevent a repeat of a government shutdown that hurt him politically?
He seems to be keeping his options open.
To embrace the agreement reached in tortuous congressional negotiations, Trump would have to try to spin a clear loss as a win -- a tactic he seemed to hint at during his rally.
As his crowd belted out "Build the wall" -- Trump tried to grope for a way out: "You really mean 'finish that wall,' because we have built a lot of it."
The President said he had been told by aides before the rally that a deal had been clinched but he had not wanted the crowd kept waiting by finding out what was in it.
"I could have stayed out there and listened or I could have come out there to the people of El Paso in Texas. I chose you," Trump said. "Maybe progress has been made, maybe not."
But details were already filtering out of the talks in Washington about the shape of Monday's deal. It is hard to believe that the President wouldn't have been told if the outcome had matched his demands that triggered the longest government shutdown in history late last year.
He also declined to go into details on the deal in an interview with conservative Fox News pundit Laura Ingraham, who has a proven track record of influencing him on immigration matters -- conducted before his rally.
"A lot of things have changed. I can't go into detail -- I just heard it very quickly coming over to see you," Trump told Ingraham.
Emphasizing the scale of his dilemma, his conservative allies in the House began to mobilize against the deal.
"While the President was giving a great speech in El Paso, Congress was putting together a bad deal on immigration," tweeted House Freedom Caucus co-founder Rep. Jim Jordan, an Ohio Republican.
Conservative media coverage of the deal will most certainly be a crucial factor.
If the reviews stink, the President could be emboldened to go ahead with a third way forward -- flexing executive power to fund the wall.
At his rally, he appeared to keep that option open too.
"It's called we are setting the stage," Trump said, before adding: "We need the wall, and it has to be built and we want to build it fast ... walls save lives."
"Let's show the country there is nothing to be afraid of when it comes to the US-Mexico border," O'Rourke said. "The eyes of history, the judgment of the future ... will be looking back at this moment."
Meanwhile the President remained unrepentant, repeating his false claim, which has even been debunked by El Paso Republicans, that a section of border wall was responsible for a huge slump in violent crime in the city.
"They're full of crap, when they say it hasn't made a big difference," Trump said at the rally.
"Safety is the birthright of every America. Which is why we must finish the wall."
Should Trump declare a national emergency to reprogram funds to build the wall, he could quickly run into legal roadblocks and worry Republican senators, who fear how a future Democratic president could use such a sweeping precedent.
But Trump would be able to keep alive the crusade for a wall and mine vehement Republican support for the project for political capital.
One option for the White House would be to accept the congressional deal -- but then seek to use executive power to find other funds elsewhere to erect new border barriers unilaterally.
A full rundown of the agreement between Republican and Democratic lawmakers from the House and the Senate is not yet available. But the first signs are that it falls well short of Trump's demands, which sparked the longest government shutdown in history in December and January for a 200-mile stretch of wall or steel fences on the US-Mexico border.
Sources said the blueprint allows for $1.375 billion in border bollards but includes a prohibition on concrete walling and permits only "existing technologies" to be used in frontier barriers.
Still, Democrats did back down on a demand for a cap on the number of places in detention centers for undocumented migrants, which had stalled the talks over the weekend.
The party had sought the restrictions in an effort to handcuff Trump's zero-tolerance policy of detaining undocumented migrants -- even those without criminal records.
The coming hours will be crucial for hopes that the President could sign the deal. As the run-up to the start of the government shutdown in December showed, he can be heavily influenced by how events play in conservative media.
But Congress has done its job.
"It's one minute to midnight. They have narrowly averted what would have been a real embarrassment," said David Gergen, a senior CNN analyst who's a former adviser to multiple Democratic and Republican presidents.
"We ought to thank them for doing that ... and say, 'Mr. President, the next move is up to you,' " he added.
CNN's Manu Raju, Phil Mattingly, Jeff Zeleny and Dana Bash contributed to this report.