President Trump has rewritten the Washington playbook on trade politics, and many Republican Senate candidates are chasing after him, embracing get-tough approaches that would have been unthinkable for them just a few years ago.

Rep. Luke Messer of Indiana, a former free trade advocate who delivered a rousing floor speech in 2015 saying open markets create jobs and economic opportunities, is blunt about the transformation: “The president has changed my opinion on these trade agreements,” he said in a debate among Republicans running for the party’s Senate nomination.

His rivals — Rep. Todd Rokita and former state lawmaker Mike Braun — have staked out similar positions, backing Mr. Trump’s criticism of “unfair” trade deals as well as his decision last month to slap tariffs on Chinese imports.

SEE ALSO: Trump hits China with tariffs on 1,300 products

Republican Rep. James B. Renacci said he is constantly weighing the pros and cons of trade as he calibrates his positions ahead of a Senate run in Ohio.

Democrats say Mr. Renacci is being wishy-washy after a long career of voting for free trade deals, including agreements with South Korea, Colombia and Panama in 2011, and fast-track trade negotiating powers for President Obama in 2015.

In Pennsylvania, Rep. Lou Barletta also backed free trade in 2011 and 2015, but now as a Senate candidate, he touts his opposition to the Trans-Pacific Partnership and praises Mr. Trump’s stiffer stance.

SEE ALSO: Trump insists there is no trade war with China

“The politics of trade have changed enormously since Trump became president,” said Darrell West, vice president and director of governance studies and director of the center for technology innovation at the Brookings Institution. “Most Republicans supported free trade, but now they have embraced his tough stance on China.”

Mr. Trump had long been a critic of U.S. trade policy, and as president he has backed up his talk with action. He withdrew from the TPP, the trade deal Mr. Obama negotiated with the 2015 fast-track powers, and he demanded rewrites of free trade agreements with South Korea, Canada and Mexico.

The irony is that it was Republicans who provided the bulk of votes for each of those deals, with 90 percent supporting the Korean agreement in 2011, among them then-Rep. Mike Pence of Indiana, and three-quarters backing fast-track powers in 2015.

“I think this phenomenon illustrates the importance of leadership, especially from the president, on trade as well as the fact that Trump remains fairly popular within the party,” said Colin Grabow, policy analyst at the Cato Institute’s Herbert A Stiefel Center for Trade Policy Studies.

The shift has free trade conservatives concerned.

“What’s most disappointing is that this protectionist approach will continue to yield self-inflicted wounds and lead to the kind of tit-for-tat exchange we are seeing now that makes Americans less free and ultimately harms workers and consumers,” said Tim Phillips, president of Americans for Prosperity. “Hurting consumers and making them pay more for everyday goods is never good politics.”

David McIntosh, president of the Club for Growth, said it marks a definite shift from the Bush years, when Republicans took for granted that trade deals were always good for the country.

“What I think is missing is leadership on why trade is important, how many jobs are created because of free trade, how much people benefit in their standard of living because of the cheaper goods they are able to get,” Mr. McIntosh said.

Mr. McIntosh said tariffs have proved to be ineffective and predicted the same will happen once it becomes clear that the latest round do more harm than good.

“I worry about candidates who are trying to go off and beat their chests and try to be macho about how they are against trade,” he said. “I think we will get the right balance there, but you will see some casualties when you see these candidates swing too far in toward protectionism.”

Mr. McIntosh said flight from free trade isn’t universal within the Republican Party and that a number of prominent candidates are sticking to their records.

But their base voters are increasingly skeptical.

Support for the North American Free Trade Agreement among Republican voters has dropped from 43 percent in 2008 to 34 percent now, according to a poll in August from the Chicago Council on Global Affairs.

Democrats, meanwhile, are becoming bullish on trade, with 71 percent of their voters backing NAFTA — up from just 41 percent in 2008.

Former Rep. Robin Hayes of North Carolina lived through several Republican trade battles.

One was in 2001, when the House was voting on whether to grant President George W. Bush fast-track trade promotion authority. Mr. Hayes worried that his state’s textile industry, already battered by NAFTA, would be further damaged.

He was reduced to tears as House Republican leaders pressured him to be the deciding vote in what turned out to be a 215-214 victory for Mr. Bush.

Four years later, Mr. Hayes again had to be pressured to switch his vote and back the Central America Free Trade Agreement, which cleared the House by a 217-215 vote. Mr. Hayes then lost his seat in the 2008 election.

Mr. Hayes, a former textile mill owner whose home state bled textile jobs after the passage of NAFTA, told The Washington Times that the votes were tough but he stood by them. He said he was able to win important concessions in exchange for his support.

“I have to live with myself in terms of this vote regardless of political implications or outcomes,” he said. “Was this the right vote? It absolutely was based on the big picture. We have to have international markets.”

Asked what he makes of lawmakers who have supported open markets in the past only to adopt the Trump mantle on trade in recent months, Mr. Hayes likened them to Don Quixote in “Man of La Mancha.”

“If I was advising people running a campaign, I would say, ‘Think in depth about the position you take and you believe in it,’” he said. “Make sure it is something you can say six months, six years, from now, ‘I did the right thing.’”

While Mr. Hayes took heat for going from a no to a yes on trade for Mr. Bush, Republican candidates now are facing criticism for going the other way for Mr. Trump.

In the Indiana Republican primary Mr. Braun appears in a television commercial strolling around town with cardboard cutouts of his rivals, highlighting their votes to grant Mr. Obama trade authority.

Mr. Rokita, meanwhile, has accused Mr. Braun’s trucking company of benefiting from lopsided trade deals that have displaced American workers.

“Mike Braun is a bigger hypocrite than even Mexico Joe,” said Nathan Brand, a Rokita spokesman.

The Braun and Messer campaigns did not respond to inquiries.

Democrats say all of the Republican candidates are opportunists on trade and that Sen. Joe Donnelly, Indiana Democrat, is the only consistent politician in the race.

“All three GOP candidates’ phony attempts to catch up to the political mood by talking tough on trade aren’t fooling anyone,” said Michael Feldman, spokesman for the Indiana Democratic Party.

Mr. Grabow said the negative view of trade Mr. Trump has instilled is misguided. If the president is correct about NAFTA, he said, then the 1990s would have been a terrible time for employment.

But the president’s pressure is working.

“If Trump was a free-trader I suspect many of these same lawmakers would have been happy to maintain their original stances,” Mr. Grabow said. “Taking positions which are not aligned with the White House can carry real costs — as Jeff Flake can attest — while mimicking his positions seems to have little downside. No one wants to risk a primary fight by being perceived as insufficiently supportive of Trump.”