The little city had always been a rare, multicolored jewel pinned to the side of the snow-flecked mountain, but by 1982 its luster had been dimmed by the depressing news of an imminent raid from the cruel north.

Greater Anchorage, the sprawling, ugly giant that claimed nearly half the state's population, was about to rob Juneau of its status as state capital. The theft required only one last statewide ballot to endorse expenditures for a new capital on the Anchorage outskirts, a proposal voters had already approved.

Something about this place, the only state capital that cannot be reached by automobile, a nearly perpendicular village that feels more like a ski lodge than a city, made proudly idiosyncratic Alaskans think twice about the move, and they voted it down.

The people of Juneau caught their breath, looked around in wonder, then went on a binge. In short order, this has become a boom town, with office buildings and shopping centers sprouting, touring ocean liners queuing up on the narrow Gastineau Channel, bankers, real estate agents and construction workers rushing in, and bare spots along a once-virgin fjord and the track of a nearby glacier filling with suburbanites.

Since 1980, the population has jumped nearly 50 percent, from 19,500 to 28,500, with most of the increase taking place in the last three years. The number of residential building permits increased 66 percent from 1982 to 1983. A huge outlet of the Fred Meyer food and department store chain materialized at the foot of a mountain near the enlarged, renovated airport.

"A lot of pent-up development energies were unleashed," said Mayor Fran Ulmer, a former Federal Trade Commission attorney who became bored with Washington and moved here in 1973. She was elected in 1983, at age 35, a nice approximation of the young, nature-loving professionals who have gravitated to Juneau.

Most of them are tied to the state government, still the city's chief employer. Although no one has tried to revive the plan to move the capital, "it is misleading to think it is totally dead," Ulmer said. In the struggle for state facilities in a time of limited budgets, Anchorage may tear off a few more plums.

But Ulmer had the pleasure of flying north last year to address the Anchorage Chamber of Commerce on the dissipation in Juneau of "the ugly shadow of economic death that had paralyzed investors and stilted the community's growth."

William Corbus, president of the region's Alaska Electric Light & Power Co., extolls the street improvements in the capital, the new dockside parking garage going up and the new water system that allows the blossoming suburbs in the Mendenhall Valley, in the shadow of the glacier of that name, to give up relying on wells.

With tour boat passengers topping 115,000, the city has acquired more than 62 restaurants, three bookstores and four fresh fish outlets where recently there were none. Ulmer is not certain that all of these can survive, and notes that the building boom has left much unrented space -- but economic optimism is unabated.

City Planning Director Thomas J. Peterson said a rich vein of silver, zinc and lead has led to serious plans for a major mine in the area, an echo of the 1880 gold strike that led Joe Juneau and Richard Harris to establish the town. The number of students at the little University of Alaska campus here is climbing. Peterson said a fisheries research center has been proposed.

To all such dreams, Peterson notes, there are limits. "We are still 900 miles from Seattle, and it still snows in the winter," he said.

Only two state capitals, Montpelier, Vt., and Pierre, S.D., have fewer people. Juneau television cannot provide the NBC or CBS network news. Plans to link the city with the rest of the world by building a road over the coastal mountains have gone nowhere; drivers still must take the long, pleasant ferry ride up the coast from British Columbia.

That disdain for the automobile gives the town much of its charm. The best hotels are no more than a five-minute walk from the squarish, unprepossessing state capitol. One longtime resident likened it to "living on a college campus," and there are other compensations.

Peterson is plotting to build a weekend cabin in the woods. Ulmer, who grew up fishing and canoeing in Wisconsin, can be out of her office and doing just that within minutes.

This is a political town, said Pete Spivey, deputy press secretary to Gov. William Sheffield (D), but a friendly one. Drivers often pause in the middle of narrow streets to chat with friends walking by. A visit to the market will take a couple of hours, what with catching up on gossip in the fresh fruit aisles.

Up in cold, cruel Anchorage, where Spivey used to live, it is a different story.

"There are just no neighborhoods there," he said. "I could go to the supermarket eight straight times and never see anybody I knew."