FAIRBANKS, Alaska — A gleaming $23 million complex of office buildings, dormitories and workshops has risen from the boreal forest just outside town over the last decade, aimed at training workers for a natural gas pipeline that was supposed to snake from the Arctic to serve energy markets around the world and make Alaska rich all over again.

But the pipeline was never built, the victim of a worldwide glut of natural gas that has reduced demand for Alaska’s supply. On a recent weekday afternoon, the meeting rooms and dorms were empty, with just one welding class breaking the silence on the Fairbanks Pipeline Training Center Trust’s sprawling 63-acre campus.

To make matters worse, the government tax dollars that built and sustained the complex are also in danger, amid pressure to cut spending in both Juneau, the state capital, and Washington. Not surprisingly, fears over what comes next are rising for residents, who saw the training center as the embodiment of their hopes for high-paying pipeline jobs.

“There’s a lot of uncertainty out there,” said Jim Sampson, a former borough mayor and labor leader who is director of the training center. “You can feel it in the community and see it in the for-sale signs on the houses.”

Economic anxiety in Alaska is roiling an already sharp-edged political season here, focused on one of the most competitive Senate races in the country: an endangered Democratic incumbent, Mark Begich, against a hard-charging Republican challenger, Dan Sullivan, a former state attorney general and natural resources commissioner.

The worries start with energy extraction, for decades a pillar of the state’s economy that provides about a quarter of its gross state product. These days, Alaska is producing and shipping less natural gas because of market forces, and pumping less oil from the aging wells in Prudhoe Bay on the North Slope, reducing jobs and tax revenues.

In 2012, North Dakota surpassed Alaska in crude oil production, providing a psychological shock to Alaskans long accustomed to thinking of their state as second only to Texas on the energy frontier.

At the same time, federal spending has tightened in the aftermath of the recession, a military drawdown and budget-cutting fervor in Washington. Despite its image of feisty independence, Alaska has long relied heavily on those dollars: It led the nation in per capita federal aid to state and local governments in 2010, the most recent data shows.

That aid helped build roads, buildings and tiny rural airstrips across the state’s vast expanses, while also providing well-paying jobs at 20 national parks, preserves and monuments, in numerous wildlife management programs and at nine major military bases.