Indiana Gov. Mike Pence speaks at the Indiana State Library in Indianapolis in March 2015 about the state’s controversial Religious Freedom Restoration Act. (Aaron P. Bernstein/Getty Images)

Through his years in Congress and his campaign for Indiana governor, Mike Pence secured enthusiastic support from social conservatives and big businesses as he emerged as a rising Republican star with national ambitions.

But the enthusiasm in many GOP circles turned to dismay last year as Pence struggled to balance the demands of those two powerful interest groups battling over a “religious freedom” law designed to protect the rights of merchants who cite religious grounds for not providing services to gay clients.

At first, when Pence’s decision to sign the law triggered criticism from major Indiana employers, such as Angie’s List and drug giant Eli Lilly, the governor vowed on national television that “we’re not going to change the law.” Then he backtracked — signing a revision making clear that businesses cannot use the legislation as a justification to discriminate based on sexual orientation.

Pence’s poll numbers tumbled, with drops in support from social conservatives as well as pro-business Republicans. And some activists continue to have doubts.

“During my time in politics, nobody has backstabbed us worse than Pence,” Steve Deace, an Iowa-based radio talk-show host active in evangelical conservative politics, said in an email to The Washington Post this week. “What he did to religious liberty last year was inexcusable.”

The Fix's Chris Cillizza explains why Gov. Mike Pence (R-Ind.) was the best vice presidential pick of the candidates Donald Trump was considering. (Peter Stevenson/The Washington Post)

As Donald Trump’s running mate, Pence would be tasked with helping the real estate mogul soothe tensions with conservative activists and the Republican establishment. But even as many conservative leaders rally around Pence’s addition to the ticket, the governor’s handling of the gay rights controversy shows how his record of dealing with the party’s competing interests could hamper his ability to build trust in the GOP for Trump. And it points to a major difference in approaches between the two men — with Trump often thumbing his nose at the party’s interest groups and Pence assiduously courting their support.

The contrast is clear in the way Trump and Pence responded after the announcement in February that Carrier, a major Indiana employer, was moving 1,400 manufacturing jobs from the state to Mexico.

Trump made Carrier a centerpiece of his criticism of free-trade deals and has threatened to punish Carrier and others moving jobs overseas. Pence, a longtime supporter of free trade, adopted a softer approach, encouraging executives to return state economic development funds while echoing the company’s argument that the move was a response to burdensome U.S. regulations.

Some Pence backers say his vast government experience in Washington and the Indiana state house makes him an ideal complement for Trump, who has never held political office.

He served in Congress for 12 years, chairing the House Republican Conference. He has been Indiana’s governor since 2013, winning election as a candidate who would cut taxes and shepherd in a new era of job growth.

Jeff Roe, who managed Ted Cruz’s presidential campaign, said he thinks Pence would be a “fabulous” running mate for Trump, in part because he would balance out many of Trump’s characteristics.

Pence has “the right mix of being a clear conservative and having legislative and executive experience,” Roe said, noting that the governor “will be yin to [Trump’s] yang.”

Presumptive Republican presidential nominee Donald Trump picked Indiana Gov. Mike Pence (R) as his running mate. Here's what you need to know about Pence. (Peter Stevenson,Danielle Kunitz,Osman Malik/The Washington Post)

As word of Pence’s selection spread late Thursday, some conservative leaders showed their support. Brent Bozell, a longtime activist, said in a news release that the Pence selection was a “homerun” and “the best conservatives could possibly want.”

As a congressman, Pence introduced himself to a Values Voters Summit in 2010 saying, “I’m a Christian, a conservative and a Republican, in that order.”

During his time on Capitol Hill, Christian conservatives grew to admire Pence’s consistent longtime opposition to abortion and same-sex marriage.

He also developed support from business allies who have embraced deals such as the North American Free Trade Agreement, which Trump has called a “disaster” and has pledged to renegotiate or end.

Among such pro-business conservatives backing Pence are billionaire donor David Koch as well as the conservative Club For Growth, which advocates for free trade and limited government spending.

Pence extolled the benefits of free-trade deals in a 2001 speech on the House floor, noting that his state’s corn and wheat exports had expanded dramatically since NAFTA was put in place in the 1990s.

“If Indiana farmers and food processors are to compete successfully for opportunities ushered in by the 21st century, they need free trade and open access to growing global markets,” he said.

David McIntosh, the former Indiana congressman who chairs the Club for Growth, said Pence has been admired for his record as a fiscal conservative and his support of free trade.

Although Pence’s presence on the ticket could give pro-free-trade advocates some solace, it might not be enough to win their enthusiastic support, he said.

“Those who want to be more comfortable with Trump will see Pence as someone who helps stabilize the ticket,” he said. “For me personally, what I would do is focus on Pence being a great vice-presidential choice and then get back to figuring out how we win our House and Senate races.”

Pence’s 2012 election as governor allowed him to shine as an executive running a politically important state.

But the battle over the religious freedom issue marked a turning point.

He alienated business backers and then social conservatives, all while appearing indecisive and not fully committed to either cause. His approval rating, according to an April NBC/Wall Street Journal/Marist survey, sunk to 42 percent, laying the foundation for Pence’s difficult reelection campaign this year — a challenge he would no longer face if he is added to the national ticket.

“It was quite a fall from grace,” said Joseph Losco, who directs the Bowen Center for Public Affairs at Ball State University in Muncie. “His poll numbers dropped 20 percent very quickly. . . . He has been struggling ever since to get his Republican supporters back.”

The announcement by Carrier marked another setback for Pence — and foreshadowed a potential point of tension with Trump.

Pence responded to the news by meeting with executives to discuss grants that the state had provided to Carrier and its parent company, United Technologies, as an incentive to create more Indiana jobs. The company agreed to repay about $1 million to the state treasury.

Pence also said that the decision to relocate had nothing to do with the business climate in Indiana but that federal regulations were a major factor.

“The fact that these companies are leaving the United States speaks broadly about the need for reform in our nation’s capital,” Pence said in a statement.

Labor leaders and Indiana Democrats blasted Pence’s response as weak and, in effect, excusing the company’s decision.

Sen. Joe Donnelly (D-Ind.) accused the governor at the time of seeking to “blame someone else for something bad that has happened to our state.” Donnelly told a local television station that the Carrier decision was more about wages than federal regulation, as Pence had claimed.

“They’ve never cited a single regulation in regards to this,” Donnelly said, recalling his own meeting with company executives. “This is about Carrier chasing Mexican wages.”

Chuck Jones, who leads the United Steelworkers local that represents Indiana’s laid-off Carrier employees, said Pence “ran away from this problem.”

“I understand that, as governor, he may not have been able to save these jobs,” he said. “But he sure as hell could have spoken out on the people’s behalf to try and save them. He did absolutely nothing.”

Trump, in the midst of his GOP primary campaign when the Carrier announcement came, responded with the sort of visceral response many labor activists were looking for. After a video circulated online showing dismayed Carrier employees getting the news, Trump tweeted: “Very sad. Will not happen under my watch!”

Trump then began to single out Carrier as a prime example of a corporation that deserved punishment for killing American jobs and opting for lower-wage labor across the border. He has said he would tax overseas-manufactured goods and boycott companies that leave. He said he has bought Carrier products in the past. “I’m not buying any more,” he said to applause at an April rally at the Indiana State Fairgrounds.

“I want to do the number on Carrier, folks,” Trump said later. “I don’t like what they did.”

Alice Crites and Anu Narayanswamy contributed to this report.