UNITED STATES - JUNE 18: Rep. Ami Bera, D-Calif., speaks at a news conference in the Capitol Visitor Center to oppose a bill that would ban abortions after 20 weeks with no exception to protect the mother's health. (Photo By Tom Williams/CQ Roll Call)National Journal

California Democrats hammering Democratic Rep. Ami Bera for his trade position are running into an unlikely source of opposition: President Obama.

Obama specifically lauded Bera, a two-term lawmaker hailing from the House district that includes Sacramento, for "doing the right thing" by backing the president's request for fast-track authority to broker international-trade deals.

Not everyone feels the same way. After Bera announced in early May that he would back fast-track trade authority, local party members, activists, and labor groups went on the attack, blasting him in newspaper editorials, airing a biting television ad, and threatening to withhold their support in the election ahead.

"It's out of touch," said Eric Sunderland, a regional director at the California Democratic Party whose jurisdiction includes Bera's seat. "The folks who have done all of the work to get him elected probably have the most skin in the game. The national Democrats are just looking at the numbers—winning seats, losing seats."

The national party, however, is continuing to back Bera and hopes to keep a seat that has been one of the most highly contested in the country in recent elections. In 2014, Bera beat former Republican Rep. Doug Ose by just 1,455 votes.

Undergirding the local-versus-national struggle over Bera is a test of organized labor's clout within the Democratic Party. The movement is opposing fast-track, saying previous trade deals have hurt domestic workers by sending jobs to ill-compensated laborers overseas. As such, they're livid with Bera over his fast-track support, especially after unions and their members spent money and time helping Bera keep his job in 2014.

At the end of last month, the AFL-CIO launched an ad buy just under $85,000 in his California district, where a narrator warns, "Congressman Ami Bera will do anything to keep his job, including sending your job overseas."

Steve Smith of the AFL-CIO's state affiliate, the California Labor Federation, said, "It would be next to impossible'' to curry support among members for Bera. And while he wouldn't rule out a Bera endorsement, Smith said it's possible the group could back a Republican, independent, or another Democrat if one emerged.

Local party leaders are already threatening to shift their resources elsewhere. Sacramento County Democratic Party Chair Kerri Asbury said it's ''very unlikely'' that Bera will receive the endorsement from the California Democratic Party, which passed a resolution opposing fast-track at its May convention. No other Democrat within California's delegation has backed fast-track.

"At the end of the day, we have to look at our positions, not the person," Asbury said. "If he's not aligning with our Democratic Party positions, then what's the point?"

For his part, Bera has said he's backing trade-promotion authority to promote jobs and grow the economy. "The new TPA demands enforceable labor standards, increased transparency, and environmental protections not seen in previous trade-authority bills," Bera told National Journal in a statement. He has noted that his support for fast-track won't necessarily extend to the Trans-Pacific Partnership, a massive trade agreement that the United States has been negotiating.

Fast-track, formally known as Trade Promotion Authority, would make it easier for presidents to negotiate trade deals by limiting Congress's ability to amend such deals and—by barring senators from filibustering such deals—guaranteeing they'll get a simple majority-rules vote to advance. The Senate has voted to approve fast-track authority, and now the matter sits with the House. With fast-track in hand, Obama would be more likely to be able to negotiate the Trans-Pacific Partnership, a still-in-talks trade deal among 12 countries (though notably not China) on both sides of the Pacific Ocean.

But while the local chorus of critics grows louder, national Democrats are riding to Bera's aid. Along with Obama's nod, Minority Whip Steny Hoyer of Maryland last week said the Bera backlash was not "fair."

"Representative Bera's constituents sent him to Washington to fight for their best interests, something he does every day," Democratic Congressional Campaign Committee communications director Matt Thornton said.

In his perennial toss-up seat, Bera's pro-fast-track vote may help shield him against attacks from Republicans, even if it costs him some support among labor groups.

"It's not a big labor district," said Rob Stutzman, a GOP strategist who worked on former Republican Rep. Dan Lungren's 2012 race, when Bera first won. "When Bera said he voted to help his district, that is probably the case. The question will be: Will labor be there for him on the reelect?"

Meanwhile, Republicans may find an opening amid the backlash, though no GOP candidate has announced a challenge to Bera so far. Ose, who lost narrowly to Bera in 2014, told National Journal he is "watching" the race develop, declining to rule out a bid.

Republicans said that the rollout surrounding Bera's support of the trade bill may be more problematic than his actual position. Last week, the National Republican Congressional Committee released a paid Web ad hitting Bera for including "widely used and disseminated statements" from the Democratic Party in an op-ed he wrote for The Sacramento Bee last month. Bera has said he takes full responsibility for the mishap.

But GOP strategists said it's likely Bera will still get plenty of financial backing next year, given how strongly Democrats have traditionally prioritized the district. "This seat has been one of the most competitive seats the last three election cycles," said Tom Ross, a GOP strategist based in Sacramento. "I don't know how the whole Democratic establishment would ever walk away."

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.