Republican congressional leaders are in the midst of a difficult struggle between a restive conservative base and the limits of their own power.

If they’re looking for a way to navigate through these difficult waters, they should take a lesson from the Democrats.

In January 2007, as the newly elected Democratic majority was about to be sworn into office, Rep. Rahm Emanuel and incoming House Majority Leader Steny Hoyer were shouted down by anti-Iraq War protesters as they attempted to address the media in the Capitol.

Emanuel and Hoyer left the microphone, and anti-war heroine Cindy Sheehan seized control. With the congressional press listening, Sheehan declared that Democrats were elected to end the war and called on them to strip its financing now that they had the power of the purse.

“These are not requests,” Sheehan said. “These are demands.”

Ultimately, the Democrats decided not to pursue this tactical approach to opposing the war. Had they defunded the war, they determined, it would have muddied the waters of the Iraq debate by allowing Republicans to accuse them of not caring about the troops and being unready for governance.

In an infamous exchange that March, then-House Appropriations Chair David Obey was ambushed by anti-war protesters pressing him on defunding the war.

He tried to explain that a defunding bill would also defund priorities such as body armor for the troops, and thus it didn’t have the votes to pass through Congress.

An increasingly frustrated Obey opened up his jacket and asked the protesters, “You see a magic wand in my pocket?”

Democrats continued to blast the Iraq War and pass resolutions against it, while providing funds for the troops. In 2008, opposition to the Iraq War helped them build on their congressional majorities and elect Barack Obama.

Coming into office in 2009, Obama and congressional Democrats faced another dilemma. Since early in the Democratic presidential primaries, Obama had made a promise to liberal activists to make passing universal health care a top priority.

There were plenty of moderate, establishment-type Democrats who argued that pursuing this policy goal -- with the economy in tatters, mounting public concern with the debt and the memory of how health care hobbled Bill Clinton's first-term agenda -- was misguided.

On the other side, there were liberal activists who said that anything short of a fully government-run single-payer health care system would be a sell out.

Others, still, argued that at the very minimum, there should be a government-run “public option” sold alongside privately administered plans on the health care program’s insurance exchanges.

Once again, Democrats threaded the needle. They pushed through health care legislation that was much more ambitious than the Washington establishment deemed prudent, while rejecting the more sweeping call for single-payer health insurance and abandoning the public option to secure enough votes.

Democrats paid a political price for their decision, as the passage of Obamacare generated a furious backlash that cost them their House majority in 2010. But they achieved a policy goal liberals had been pursuing since the New Deal.

Compare that to the way Republicans have behaved. When Republicans had full control over Washington during the Bush era, they used their power to stomp all over conservative principles and drastically expand government.

This month, with limited control of Washington, Republican congressional leaders allowed themselves to be dragged by activist groups into a doomed budget showdown.

If Republicans want to advance the conservative agenda, they should study the way that Democrats balanced their liberal goals with the realities of legislating.