WASHINGTON — While President Donald Trump adjusts to life with a Democratic-led House, some Republican members of Congress are also wrestling with their own allegiances and political futures, finding ways to distance themselves from their party's president as a new era of divided government begins.

Cracks in the GOP ranks have already emerged as skittish Republicans, many of whom face difficult elections in 2020, have begun asserting their independence.

Their actions have ranged from siding with Democrats on efforts to reopen the government to writing a stinging op-ed about the president in just the first week of the new year.

And with a host of Republicans facing re-election in blue or purple states or districts in 2020, Democrats plan to take advantage of the political dynamics to upset the GOP's agenda.

A handful of House and Senate Republicans have already broken ranks with Trump and GOP leaders on the government shutdown by coming out in support of a Democratic proposal to re-open the government that does not include funding for the president's border wall — an early indication that some Republicans will have a challenging two years navigating a president who governs toward the base of the party.

“You’re not just walking a tight rope, you’re eating, sleeping, and breathing on it,” said Matt Gorman who was the National Republican Campaign Committee communications director for the 2018 elections.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Gorman noted that while presidential elections have a different dynamic for congressional candidates, it's not too early for candidates to be concerned. “Unlike 2018," he said, "2020 will not be a referendum on Trump, it’ll be a choice. However, they need to be thinking about Election Day 2020 now."

A total of eight House Republicans voted with all Democrats on measures that would have ended the government shutdown Thursday night. And two Senators have said that the Senate should take up the House-passed bills.

The measures would fund six of the seven remaining appropriations bills that had previously gained overwhelming support in the Senate in the last Congress and a measure to extend Department of Homeland Security funding until February 8 to allow more time for party leaders to reach a compromise on the border wall funding. Neither of the bills included funding for the president’s demand for a border wall.

Sen. Cory Gardner, R-Colo., who might have the most difficult race in in 2020 in a state that is edging more Democratic each election, was the first Republican to say that Senate should vote on the House bills to reopen the government.

He acknowledged the perils of opposing Trump but said that the president understands that he has to broaden his support if he’s going to win re-election, which would in turn help him.

“The president also has to win the states he either barely carried or didn’t carry to win re-election,” Gardner told NBC News in an interview. “While this (border funding fight) is maybe more a base-appealing measure, there are other issues he’s going to have to do to broaden the base.”

Sen. Thom Tillis, R-N.C., another member up in 2020 who is looking for a solution to the stalemate, wrote an op-ed in The Hill floating the idea that agreement on a border wall could be coupled with relief for Dreamers in the Deferred Action for Childhood Arrivals program.

Democrats plan to try and put pressure on vulnerable Republicans on controversial issues by painting them as allies with a president who is increasingly less popular among independent voters, starting with the shutdown. The Democratic campaign arm in the Senate, the Democratic Senatorial Campaign Committee, has already begun targeting potentially vulnerable Republicans like Gardner and Sen. Susan Collins R-Maine.

“Senate Republicans own every miserable consequence of their pointless shutdown and those up for election this cycle have a choice: join Democrats in reopening the government by passing the legislation they’ve already supported or give voters another reason to throw them out of office in 2020,” said David Bergstein, Democratic Senatorial Campaign Committee spokesman.

Collins has said that she’d support the House bills if Senate Majority leader Mitch McConnell brings them to the floor, telling reporters she sees “no reason why the bills that are ready to go, on which we’ve achieved an agreement, should be held hostage to this debate over border security.”

In the House, Rep. Will Hurd, R-Texas, who narrowly won his re-election and whose border spans 1,500 miles of the Texas border with Mexico, voted to reopen the government. Political strategists have said that the last-minute attention on immigration and the caravan by the president nearly cost Hurd his re-election.

And Rep. Elise Stefanik, R-N.Y., who easily won her re-election in her upstate New York district, is positioning herself as an independent voice in the Republican Party, said she voted for the bills because “I oppose government shutdowns.”

Perhaps an indicator of the challenge for some Republicans, two veteran Republican senators from red states — Lamar Alexander of Tennessee and Pat Roberts of Kansas — have already announced that they won't seek re-election in 2020. Both are conservative senators who have a history of working across the aisle.

“I’ve learned that being true to myself and sticking to my principles will always win the day,” Roberts said in his speech announcing he would not run in 2020.

And others are seeking their own independence from the president. Freshman Republican Sen. Mitt Romney of Utah started his congressional career with a strong statement of opposition to the president in an op-ed. While he doesn't have to run for re-election for six years, he does have to serve with a president who he said has fallen short of presidential leadership.