Now, with Republicans in control of the House, the Senate and the White House, the party is being forced to confront its deep divisions over immigration, which threaten to compromise its capacity to provide coherent governance.
The debate is matching various party factions against one other and testing the willingness of the Republican base to accept a necessary compromise with Democrats that is certain to be portrayed by some as a moment of political betrayal.
"Everybody has their own franchise ... but somebody has to put forward a document, somebody has to put forward a bill," Arizona Republican Sen. Jeff Flake said Wednesday. "I don't see any other game in town."
For Trump, the immigration policy debate marks a watershed moment. It is one of the first times that he has been required to show genuine political courage, to take steps likely to alienate his loyal voters, who have stuck with him through everything.
All presidents reach such a moment sooner or later, when the national interest, the requirements of governance and even their own legacies require them to expunge political capital they have spent years building.
Trump's improvised and shifting positions over the past few days on what he wants to see in the bill suggest that he has not yet reached the moment when hesitation solidifies into resolution and trust in political fate.
Yet Republicans on Capitol Hill say that only an unequivocal statement by Trump about the bill he wants to see, and a sincere effort to offer cover to conservative lawmakers, will allow a compromise to get to his desk.
Closing the deal
Given the central role played by immigration in his presidential campaign, Trump may be the only personality in Washington who can close the deal.
But the President's comment Tuesday at a bipartisan meeting at the White House that his position would be "what the people in this room come up with" struck many of his allies in Congress as an abdication of leadership, and well short of the level of commitment needed to bring the party together.
That has left the fate of the immigration bill, despite multiple efforts by different groups in Congress to find a solution, in limbo.
"In terms of how we get to the finish line, I'm not sure I see that yet," one Republican senator told CNN on Wednesday on condition of anonymity. "Everyone seems to think there's the outlines of a deal, but like I said, I'll believe it when I see it."
For Republican lawmakers, the showdown marks a moment when the responsibilities of power clash with their pursuit of ideological purity.
The party is split between comparative moderates who want to solve the issue, understand the political and humanitarian weight posed by the plight of those affected by the Deferred Action for Childhood Arrivals program and believe that the GOP must ease its position on immigration to ensure future viability. They include South Carolina Sen. Lindsey Graham and Flake, who have fought for years to enact immigration reform and are part of the 'Gang of Six' GOP and Democratic senators seeking a deal.
Then there are Republicans who are more hard-line on immigration, many of whom see the prospect that those covered by DACA
could be granted a path to citizenship as tantamount to amnesty, one of the most potent words in the conservative lexicon. Hard-liners on immigration include Arkansas Sen. Tom Cotton and Iowa Sen Chuck Grassley, who are concerned about questions like E-Verify, family-based migration and border enforcement.
The chasm that the party must traverse is huge. Texas Sen. Ted Cruz said Wednesday he could not countenance voting for the kind of bill he understands would be put forward by the gang of six.
"It would be inconsistent with the promises made to the working men and women of this country that we would put them first, so I very much hope Congress doesn't do so," he said.
No one in the Republican Party doubts the potency of immigration. Key figures in the conservative media have warned it is the one issue that could tear the party apart and even threaten Trump's hold on his dedicated base voters.
In fact, immigration is an issue that changed the face of American politics, since it was used deliberately by Trump to build an insurgent power base that eviscerated the Republican primary field in the 2016 campaign.
The current debate is also forcing Democrats into a searing process of political self-examination -- since the fate of DACA recipients is as important to their grass roots as the wall is to Trump's. Failing to fight their corner could have consequences for the party's support among Hispanic voters, who are vital to the party's hopes of winning back power on Capitol Hill this year and the White House in 2020.
But since it is in power, the price for the Republican Party has never been so acute if it fails to find a resolution for DACA recipients. Overwhelming majorities of Americans support shielding people who were brought to the US illegally as children through no fault of their own, and the specter of mass deportations could be hugely damaging to the GOP in already tough midterm elections.
Even lawmakers who oppose granting a path to citizenship for DACA recipients understand the need to avert that nightmare scenario.
"Right now, I think the best way to do this is not to offer any kind of long-term citizenship, but legalization instead," said Rep. Mark Walker, the leader of the conservative Republican Study Committee.
As well as the national political consequences of acting, or not acting, the DACA imbroglio is forcing the GOP to question longtime and fundamental positions on the details of immigration as never before.
That journey into the party's soul includes finally coming up with a definition of what exactly Trump means -- and will accept -- when it comes to funding the border wall that he placed at the center of this campaign.
Will the President -- and his voters -- settle for an amalgam of walls, fences and electronically monitored border areas broken by areas of impassable topographical features like rivers and mountains, for instance?
Then the GOP must shape its own position on questions that include whether DACA recipients should be allowed to bring their parents or grandparents into the country once they are legalized. The party must arrive at a definition of exactly what it means by border security and balance the demands of its rambunctious base with other Republican constituencies like business and agricultural groups that are alienated by hard-line GOP positions on workplace verification systems like E-Verify.
The politics of the debate are so treacherous that there is no guarantee that any compromise forged by the various interest groups in the GOP caucus will win majority support in the party or in Congress, a dynamic that often played out in the health care and tax reform debates and can make assessing the progress of any reform effort highly uncertain.
"Just because we have two groups negotiating their position, they don't speak for everybody," said Louisiana Republican Sen. John Kennedy.
"I mean they don't speak for me. I'm gonna see what this final product looks like."