Under the presidency of Donald Trump, America's political parties have scrambled their traditional positions on war and peace.

The GOP has spent the bulk of the last 17 years arguing in favor of launching and then continuing overseas wars. But now some Republicans in Washington - and most Republicans in the country at large - back Trump's plan to withdraw most U.S. troops from far-flung battlefields.

Democrats, meanwhile, have argued for many of those same years that U.S. troops need to come home. While that is still Democrats' ultimate objective, many of them are responding to Trump's withdrawal plans with a call that sounds incongruous for them: not so fast, they say, let's keep the troops abroad at least a little while longer.

To be sure, there are plenty of members of both parties who are deviating from the new script. And the battle lines are still taking shape.

For instance, the Democratic presidential contenders, who are looking to appeal to the party's liberals, are, oddly enough, siding with Trump on the need to end U.S. involvement in the wars, though they would never put it that way.

And while most Republican voters seem to be taking Trump's cues on the need for withdrawals, he is facing fierce resistance from the GOP foreign policy establishment.

Out of this maelstrom of changing views, however, a bipartisan consensus is forming in the middle bands of the political spectrum, at least in the Capitol, around resistance to Trump's isolationism.

A Jan. 31 procedural vote in the Senate on a Republican-written resolution that would caution against a "precipitous" U.S. withdrawal from Syria and Afghanistan may be a bellwether of the new congressional consensus.

And more centrist warnings may come soon in both chambers.

On Tuesday, Trump's State of the Union address will call for shutting down what he will dub America's endless wars, a senior administration official told reporters. House Democrats filed bills this week that would constrain Trump's ability to pull troops from Syria and also South Korea. Meanwhile, the House Armed Services Committee received a Jan. 30 classified briefing on Syria that its leaders found unsatisfying. And next week the panel plans a classified briefing on Afghanistan and will hold an open hearing on America's counterterrorism campaigns.

Congress is unlikely to force the commander in chief to do anything, but the debate will shape the public's views on which course is right.

"President Trump still wields paramount influence on the Trump administration," says Michael Rubin, a foreign policy expert with the conservative American Enterprise Institute.

Trump's withdrawal plans are still taking shape. He tweeted in December that "all" 2,000 U.S. troops in Syria are coming back "now," but since then officials have said it will take several months to get them out.

On Afghanistan, the president has yet to announce a reduction in U.S. forces, though he has asked the Pentagon to draft plans to extricate half of the up to 14,000 troops there now. The United States is negotiating a peace deal with its longtime foe, the Taliban, though the Afghan government is currently not a part of the talks.

The two parties' views on these issues, at least among voters at large, have changed radically compared to where they were for most of the post-9/11 war years.

A Pew Research poll conducted in mid-January showed the public overall is split on whether U.S. troops should come home from Syria. Within that overall finding, the political parties' views were telling.

Among those polled who had an opinion on the issue, 58 percent of Republicans (traditionally the party more inclined to support military engagement abroad) favored withdrawal from Syria, while 60 percent of Democrats (who are typically more skeptical of overseas occupations) thought pulling U.S. troops from Syria would be the wrong decision.

By all appearances, members of the two parties are reshaping their traditional war policies based on partisanship - support for Trump in the case of most Republicans and opposition to Trump in the case of most Democrats.

"The leaders of their parties stake out issues in partisan ways which the public then follows," says Douglas Foyle, a professor of government at Wesleyan University who tracks the politics of national security.

Republicans in Congress are not as anti-war as Republicans at large have recently become.

On Syria, two senior House Armed Services Republicans said in brief interviews this week that they are worried about how the troop pullouts are being done.

"I still think it's a mistake to withdraw all U.S. troops" from that country, says Mac Thornberry of Texas, the panel's top Republican and its former chairman. "ISIS still exists," he said, referring to the Islamic State terrorist group, "and there are a variety of other considerations, including the people who have fought with us and for us."

A U.S. military departure could leave Kurdish forces who fought with Americans against ISIS exposed to attacks from Turkey, which considers them an enemy, and from the Syrian government, many experts say.

Rob Wittman of Virginia, another senior Republican on House Armed Services, says the Kurds could be "at risk" if the pullout is not done carefully, and he believes U.S. forces in the south of Syria are helping protect Jordan.

Even Republicans who are against the president's position are straining to not criticize him overtly. They depict the differences as about how to get troops out, not whether.

"It's about the timing and the pace and tactically the locations where you pull the troops out," Wittman said of the Syria withdrawal.

On Afghanistan, too, Republican hawks are wary of the president's instincts to reduce the U.S. military presence in global hot spots. But, publicly at least, their criticism is still muted.

Thornberry says it is premature to pass judgment on a potential Afghanistan withdrawal.

Wittman says he thinks Trump's approach in Afghanistan is "outcome-based" - meaning it will not be driven by a timetable but by conditions.

Despite GOP efforts to minimize public signs of discord, Republican resistance to the president's plans for U.S. forces abroad was on full display in the Senate's Jan. 31 procedural vote on the resolution warning against a precipitous withdrawal.

The amendment to a Mideast policy bill was written and pushed by no less a GOP stalwart than Mitch McConnell of Kentucky, the majority leader who has consistently stood with Trump on virtually every other issue.

The Senate voted 68-23 to advance the measure to a vote, which is scheduled for Monday evening.

Trump has said that the Islamic State is defeated in Syria and U.S. troops should come home promptly. But McConnell made the opposite points in floor speeches in which he also cautioned against withdrawing too rapidly from Afghanistan.

"Real dangers to us and to our allies still remain in both these nations so we must continue to confront them there," McConnell said on the Senate floor on Jan. 30.

Senate Republicans overwhelmingly supported McConnell's measure, with 43 of 46 voting for cloture.

Meanwhile, the tally among senators who caucus with the Democrats was almost evenly split: 25-20 in favor of advancing McConnell's measure. Seven Republicans and two Democrats did not vote on the procedural motion.

Even if most Senate Democrats found themselves in the position of supporting military deployments overseas, those who voted no did so largely because they were concerned that a yes vote on McConnell's measure would be seen as an endorsement for war.

Notably, the Democratic presidential aspirants - Kirsten Gillibrand of New York, Bernie Sanders (an independent who caucuses with Democrats) of Vermont, Amy Klobuchar of Minnesota, Cory Booker of New Jersey, Kamala Harris of California and Elizabeth Warren of Massachusetts - all voted against McConnell's rebuke of Trump, essentially because they saw it as a pro-war statement.

In fact, before the Senate votes Monday night on passage of the amendment, senators must first decide whether to alter the resolution with a Democratic-authored amendment clarifying that nothing in it should be construed as authorizing or declaring war.

Notwithstanding their presidential contenders and some liberals, a large portion of Democrats in Congress, like the 25 Democratic senators who backed McConnell last week, are joining with hawkish Republicans in trying to make sure any withdrawal is done right.

In this respect, Democrats find themselves in the historically atypical role of urging a slower and wiser withdrawal, even if they still endorse the general proposition of bringing troops home.

"If we can reduce the U.S. troop presence out there in the world where they are in combat zones, I'm wide open to that," says Adam Smith, D-Wash., the House Armed Services chairman. "But I do need to see a plan for how we're going to make those decisions responsibly."

Smith says he did not get such a plan in this week's classified briefing on Syria.

The political debate, he says, is complicated and very much in flux.

"I think it's a 50-50 debate on whether we should be there or not and in what numbers and in what capacity," he said of the Syria and Afghanistan questions. "All those things matter."

Sen. Dianne Feinstein, D-Calif., who backed McConnell's amendment, said in a statement after the procedural vote that she, too, would like to see U.S. troops come home - but not in the way Trump is doing it.

"Overall," Feinstein said, "I agree with Senator McConnell that the precipitous withdrawal from Syria or Afghanistan without a political resolution to each conflict would risk all that our men and women have achieved."