GOP may try to block Obama’s new executive actions. It’s worked for them before.

President Obama’s new executive actions on gun control go after arguably the most powerful interest groups in the country – there’s almost no way that the gun lobby would go down without a fight. But thanks to past setbacks, the administration should now be prepared, particularly since the president is keenly aware of what happens when his plans aren’t bulletproof.

When Obama unveiled his series of steps to reduce gun violence on Tuesday, the circumstances behind his announcement felt like déjà vu. Disappointed by a narrow defeat of legislation that could have addressed a major problem and frustrated over inaction in Congress, Obama vowed to take what steps he could on his own. He didn’t have an election to worry about or hold him back. Plus a broad swath of the American public agreed that the existing system was broken. The move was undeniably controversial politically, but it was a calculated decision with human interest outweighing the costs.

It’s the same series of events that led Obama to take sweeping action on immigration in 2014 to shield millions of people from deportation. Just as with his gun control moves Tuesday, the president promised then that his immigration measures were lawful and within his executive powers. He assured the immigrant community that they would be safe and the measures would be rolled out within due time.

Instead, 5 million immigrants are still waiting for that day to come.

It’s been 18 months since Obama pledged to protect millions of immigrants from deportation, 13 months since he formally unveiled his plan and seven months since the bulk of those who qualified were supposed to start sending in their applications for temporary legal status. Yet thanks to a series of legal challenges and the administration’s own unforced errors, the immigration actions have been on hold and will likely continue to be frozen until the waning days of Obama’s presidency.

It’s a preview of the types of hurdles that the president will likely face in trying to expand background checks for online gun purchases. Opponents fiercely defend their Second Amendment rights and the power of the gun lobby is far-reaching. It’s only a matter of time before the lawsuits start flying to challenge the gun control actions in the courts.

“His executive order will no doubt be challenged in the courts,” House Speaker Paul Ryan said in a statement on Tuesday. “Ultimately, everything the president has done can be overturned by a Republican president, which is another reason we must win in November.”

A precursor to the potential legal battle over guns, GOP presidential candidates have signaled that conservatives will not allow the executive actions to outlast Obama’s presidency. Considering their successes in blocking his immigration actions, conservatives already have a road map of how to pull it off.

Twenty-six states sued the administration within weeks of Obama’s 2014 announcement that as many as 5 million undocumented immigrants could apply for legal, temporary status in the U.S. Opponents were able to carve out a path to success by filing the suit with a sympathetic district court judge in Texas and a notoriously conservative-leaning appellate court. The result: The measures were put on hold before they even started. The legal battle slogged on for nearly a year.

The major sticking point that ultimately snagged the administration’s plan seemed so small in the grand scheme of things – federal officials violated procedural rules that required a 30-day notice and comment period for the public. States also argued that the administrative costs to provide thousands of driver’s licenses to undocumented immigrants would put a huge burden on already strapped local resources. The lower courts agreed.

The administration has remained adamant that the Supreme Court will ultimately side with allowing the immigration actions to go forward. The justices will decide later this month whether they will hear oral arguments on the case. But even if the actions are eventually enacted, opponents have effectively run out the clock by leaving little time for the programs to get up and running before Obama leaves office. They can try similar tactics with guns. However, some legal experts say that Obama’s actions on guns are so modest that it’s unlikely to be challenged all the way to the high court.

“At first glance, it could be like the immigration challenge, but I don’t think it’s as expansive or broad or maybe even as important just in terms of scope,” said Carl Tobias, a law professor at the University of Richmond. “It looks more like incremental steps and less vulnerable to challenge legally.”

Elizabeth Wydra, chief counsel at the Constitutional Accountability Center, said that though pro-gun interests groups could try and sue over the gun control actions, Supreme Court precedent would make any legal challenge an uphill battle.

“The actions announced this morning so squarely fall within the president’s power – the requirement that he faithfully execute the law – that those challenges would go nowhere in the courts,” Wydra said. “If anything the criticism would be that it’s a fairly conservative action.”