House Minority Leader Nancy Pelosi (D-Calif.), with Senate Minority Whip Richard J. Durbin (D-Ill.) center, and Senate Minority Leader Harry M. Reid (D-Nev.), speaks at a news conference on June 25. (Susan Walsh/Associated Press)

The sweeping bipartisan House vote Thursday to approve the final pieces of President Obama’s trade agenda ended, for now, a feud that left Democratic leaders shaken and fearful of long-term damage should the dispute reignite.

The divide pitted Democrats who supported Obama’s trade policies against those backed by labor unions and liberal activists whose tactics included politically threatening the president’s allies. But the debate also exposed a key difference between the Democratic presidential front-runner, Hillary Rodham Clinton, and her rivals, particularly Sen. Bernie Sanders (I-Vt.), who repeatedly criticized the former secretary of state’s reluctance to take a strong position on a trade deal that she once predicted would be the “gold standard” for such pacts.

The family fight began two months ago when Obama and Sen. Elizabeth Warren (D-Mass.), considered a rising star among liberal activists, fired salvos at each other. It continued this week as members of the Congressional Black Caucus questioned Minority Leader Nancy Pelosi’s tone ahead of Thursday’s key vote on the measure, which passed on a 286-to-138 roll call that masked the tension in the Democratic caucus.

Party leaders are now just happy to try to regroup and find another issue to focus on.

“Oh, relieved. You know, we hate to see our ranks split, particularly on a very emotional issue, where our own people are split and so are those who support us,” said Sen. Richard J. Durbin (Ill.), the No. 2 Democratic leader, who rebuffed pleas from Obama for support. “So the quicker we can move to something where we’re back together again, the better.”

Beyond those deep concerns in the trade fight was the fear that the party still has not pivoted toward an economic agenda that appeals to middle-class voters after last fall’s rout in the midterm elections.

“Our party needs a better agenda than trying to kill trade deals. Even if we had succeeded, it’s no substitute for an agenda,” said Rep. Peter Welch (D-Vt.), a liberal who opposed the trade legislation. “Let’s oppose fast track, but let’s not pretend that’s an agenda.”

Some Democrats stressed that on a wide array of economic issues, including the minimum wage as well as a revamped tax code in which the wealthy pay more, there is unity. Even so, Sen. Ron Wyden (Ore.), the ranking Democrat on the Finance Committee who helped negotiate the trade package, said the past two months laid bare the chasm over Obama’s push to win a 12-nation trade deal across the Pacific Ocean.

“The trade issue is, for many Democrats, the most difficult economic issue,” Wyden said.

The matter is likely to return to Congress later this year or early next year, if Obama is able to finalize the Trans-Pacific Partnership, the pending trade deal that represents about 40 percent of the global economy. The legislation approved this week sets the framework for how Congress would handle TPP, giving timelines for the House and the Senate and requiring simple up-or-down votes without amendments.

“It’s not over. It’s not over,” said Rep. Rosa L. DeLauro (Conn.), who led the Democratic rebellion that temporarily froze Obama’s agenda. “So we fight on.”

After five years of watching Republicans wage their internecine battles with tea party activists, Democrats said they devolved into their own version of that dispute this spring. Liberals and labor unions allege that trade deals have disproportionately benefited corporations at the expense of domestic workers, while Obama said it was a progressive trade deal that would allow the United States to set the rules for commerce in a pivotal part of the world.

The pitched battle included personal attacks that were reminiscent of Republican fights, right down to outside groups threatening primary challenges to Democrats if they didn’t oppose Obama.

“What we watched on this effort was an arrogance. We were shut out. Quite frankly, disrespectful, of members and their input,” DeLauro said of Obama and his advisers. At a news conference DeLauro arranged outside the Capitol in early June, Rep. Brad Sherman (D-Calif.) said Obama shared “the same values but not the same lifestyle” as House Democrats because he lived “in a cloister” where only chief executives got to visit.

In early May, Obama and Warren set the tone. He repeatedly singled out the senator’s critique of the trade bills, at one point calling her “a politician like everybody else.” She returned fire by accusing him of trying to “grease the skids” on a “secret” trade deal that benefited only corporations.

After a few unsteady moments in May, the Senate finally secured 62 votes — 48 Republicans and 14 Democrats — and sent the bill to the House, where Pelosi (D-Calif.) was visibly uncomfortable in trying to navigate the fight between Obama and some of her closest friends in the House.

Two weeks ago, after Obama made a plea for their support in the Capitol, a raucous group of House Democrats led cheers to take down that day’s vote by opposing funding for a worker program that they otherwise support. Pelosi joined the revolt at the last minute, as the trade initiative stalled because both portions needed to win a majority in separate votes for the entire package to advance.

In the ensuing days, Clinton was dragged into the debate while campaigning in Iowa. She sounded as though she was supporting Pelosi, but on the actual vote at hand, she declined to take a position, and Sanders pounced.

How did Clinton comport herself? “Not well,” said Rep. Marcy Kaptur (D-Ohio), a fierce opponent of trade. Kaptur attended a Monday meeting of northern Ohio party activists. “I was never asked about her once,” she said of Clinton. “You know who people asked me about? Bernie Sanders.”

By last week, Obama was working closely with Republican leaders to pass the bills separately.

The final act was Thursday’s House vote on the revamped package that included the worker training funds and the popular African Growth and Opportunity Act (AGOA), which promotes African trade.

At a Wednesday morning meeting of House Democrats, Pelosi’s position again was unclear to lawmakers, according to five Democrats in attendance. At one point, she suggested that members might vote yes because AGOA was critical to the Congressional Black Caucus (CBC).

Reps. Charles B. Rangel and Gregory W. Meeks, both New York Democrats and senior CBC members, challenged Pelosi, telling her that it was an issue that all Democrats should support.

“It was sounding as though we should only pass [the worker program] because it was connected to AGOA and out of deference to the CBC,” Meeks said.

After the meeting, Pelosi said she would support the plan, ending any suspense over the final votes of the two-month war among Democrats on trade.

At her weekly news conference, she acknowledged that it would be good to focus on some other issues but warned that once Obama brings the Pacific trade deal to Congress, the fight will resume.

“We welcome that opportunity with lowered heat to go forward with it,” she said, “but with increased intensity and scrutiny and bright light shining on what is in this TPP.”