FARMINGTON, W.Va. – Decades ago, John Manchin Jr., a civic leader in a small coal town in West Virginia, lent his support to a Democrat running for Congress. His candidate lost to a Republican named Arch Moore Jr.

After the election, Manchin applied for a federal loan to keep his furniture store afloat. He received a call from his newly sworn-in congressman, Moore, offering to help. Manchin reminded Moore that he had worked for his opponent. "John, maybe you've forgotten," Moore said. "I took an oath of office that I would represent everybody in my district."

The small-business man seeking the loan was the father of today's Democratic senator from West Virginia, Joe Manchin III. And the congressman who helped secure the loan was the father of the state's Republican senator, Shelley Moore Capito. The younger Manchin recalled the episode in a 2015 eulogy for Moore, extracting a lesson about how politics can transcend partisan labels.

Today, as President Joe Biden pursues a broad agenda on infrastructure, voting rights and climate change, Manchin, the vacillating 50th vote in Democrats' control of the Senate, has become perhaps his party's most contentious figure. He has vowed to withhold support from bills that are not bipartisan, insisted he will not weaken the filibuster and preached to Democrats to "have faith" that there are enough "good people" in the Republican Party to avoid gridlock — a view increasing numbers of Democrats deride as naive, or worse.

Last week he angered Democrats by spelling out in a newspaper column that he would oppose his party's broad voting rights bill and would never vote to end the legislative filibuster.

It has thrown a dark cloud over Democrats' hopes for major legislation before the 2022 midterm elections. Frustrated with Manchin and confused about his motives, many Democrats have asked: Why, in seeking an armistice with Republicans, has he allowed himself to become one of their greatest weapons?

But back home in West Virginia, Manchin's stubborn belief in working across the aisle is recognized as the core of his being, not mere posturing for a conservative state where he may seek re-election.

Manchin is a former quarterback who relishes holding leverage over Democratic policy, along with his place in the national spotlight. His insistence on bipartisanship in Washington stems from his years as governor, when he brought warring factions together on some thorny issues; from West Virginians' resentment of the liberal wing of the Democratic Party; and from an earlier era when national politics was viewed through a small-town lens, like that in Manchin's hometown, Farmington, where his die-hard Democratic father received help from a Republican.

Even though the hyperpartisan Senate is not the collegial place it once was — where members argued by day and then dined together at night — and even though small-town West Virginia, with its coal-ravaged mountaintops, can seem a nostalgic anachronism, both institutions dwell as ideals in Manchin, according to people who know him.

"There is a lot of 'Mr. Smith Goes to Washington' in Joe Manchin," said Jim Humphreys, who served in the state Legislature with him and has worked on Capitol Hill. "There is a sense of, 'I need to do what's right, and if I have a legacy in the Senate, that's what it's going to be.' "

On Thursday, Manchin was part of a bipartisan group of 10 senators that reached a deal on an infrastructure package, although it is far from assured that enough Republicans are willing to join them to overcome a filibuster.

Humphreys said that Manchin's optimism might be outdated in the era of Sen. Mitch McConnell, R-Ky., the minority leader, who has said his chief priority is to stop Biden. "I don't think Joe Manchin is naive," Humphreys said. "I'd say he holds expectations of the goodwill of other people that may not be met because they may not have that much goodwill."

A significant influence on Manchin's values, according to interviews with a dozen West Virginia political figures, is that party labels in the state are fluid. Until recently, West Virginians voted overwhelmingly for Democrats. Now they vote overwhelmingly for Republicans. Despite that, Manchin has survived and thrived as a Democrat who believes that he can reach all sides.

"All the people he grew up with were Democrats; they're not anymore, but in his eyes, they haven't changed — they're the same people," said Jonathan Kott, a former top aide to Manchin in Washington.

Both Manchin's father and his grandfather were mayors of Farmington, a hamlet tucked into a seam in the state's northern mountains. Today, Main Street is anchored by a Family Dollar and the Manchin Clinic, a practice run by a brother of the senator's. Town Hall has a food drop labeled "Take a Blessing/Leave a Blessing." The community was the site of a devastating 1968 coal mine explosion that killed 78 men, including one of Manchin's uncles.

Another uncle, A. James Manchin, was given a prominent job in state government by Arch Moore Jr., who became governor, further entwining the Manchin and Moore political dynasties, even though they represented different parties.

For Democrats hoping that Manchin will see Republicans as committed to gridlock and that he would be willing to take drastic measures, the senator made clear in the Charleston Gazette-Mail last Sunday that he would never vote to end the legislative filibuster.

In doing so, he most likely doomed the For the People Act, the Democrats' sweeping bill aimed at countering voting restrictions in Republican-controlled states, which many Democrats see as an existential threat to fair elections and to their party.

"It's a core belief with Joe that our politics has become too tribal and hyperpartisan, and he looks at his legacy as someone who has been able to get things done, to work with both sides," said Mike Plante, a Democratic strategist who has advised Manchin as well as his opponents.