Price cuts have been replaced by bidding wars. A once-sleepy downtown is flush with urban-renewal projects. A luxury condo tower with penthouses priced over $4 million is under construction. Sacramento, Calif., long seen as a fairly bland government town, is in the midst of a real estate boom.

When Suzanne Greer listed her six-bedroom home just outside of Sacramento last month, so many potential buyers showed up to the three-hour open house that her real-estate agent had to extend it by two hours. Offers started coming in that evening. Eight buyers entered a bidding war.

"We’ve been here 17 or 18 years and have never seen it like this," says Ms. Greer, who, with her husband, owns a commercial air conditioning business. She sold the home for $40,000 over the $799,000 asking price—plus two months of free rent so she doesn’t have to move out right away while she builds a new home nearby.

Houses are moving fast. Homes in Sacramento have been selling in an average of 34 days—six days faster than they were at this time last year, and 28 days faster than the U.S. overall.

It is a dramatic turn of events for a city that just a couple of years ago was still struggling to pull out of a deep housing slump, even as other markets in California surged. Sacramento is finally seeing the kind of downtown resurgence that is been happening in cities across the U.S. over the past 10 to 15 years. And the region is partly benefiting from some spillover as San Francisco and Silicon Valley’s tech boom brings skyrocketing prices and a housing shortage, pushing buyers to look further afield.

About an hour-and-a-half drive northeast of the Bay Area, Sacramento remains relatively affordable. The median price a square foot of a Sacramento-area home is $228, compared with $531 in the Bay Area.

More: West Hollywood is Los Angeles’s Shabby Chic Neighborhood

If current trends hold, Javier Vivas, manager of economic research for Realtor.com, predicts that Sacramento prices will rise 7.2% this year over last year, compared with a national average of about 3% over the same period. San Francisco prices are forecast to rise by 8.4%. (News Corp., owner of The Wall Street Journal, also operates Realtor.com under license from the National Association of Realtors.)

Nick Sadek, a real-estate agent with Sotheby’s International Realty, says about a third of his buyers come from the Bay Area. One client, who works for Google and is able to work remotely, sold his small home in Menlo Park for $4 million and bought a 3,800-square-foot home in a Sacramento suburb for $1.3 million.

Raleigh and Nan Klein sold their home in Alameda, near Oakland, last year to buy a home in Davis, 20 minutes outside of Sacramento. After 30 years, the empty nesters say they were tired of the Bay Area’s congestion and looking for an easier place to live.

"We were looking for somewhere we could walk and bike a lot," says Mr. Klein. In December, they purchased a two-bedroom home with a den in the Cannery, a new-home community set up around an urban farm that is bikeable to town. Though the couple declined to say what they paid for their homes, similar models start in the $700,000 range.

Developers are betting big on a revitalization of the city’s downtown, which is pocked with seedy areas and long offered little beyond offices and the state capitol building.

A partly vacant Westfield mall has been mostly dismantled to create Downtown Commons, an 11.8-acre pedestrian-friendly residential and commercial plaza. Developed by the NBA’s Sacramento Kings and JMA Ventures, it includes offices, shopping and the new Golden 1 Center, the only indoor/outdoor NBA arena that is 100% solar-powered (and boasts an $8 million Jeff Koons sculpture). Nearby, a local developer is turning a 100-year-old bank building into a 30,000-square-foot upscale food hall. Local developer LDK Ventures is turning an old 140-acre rail yard into a development with a Kaiser hospital, a Major League Soccer stadium, offices and housing.

More: Park Slope—That Famously Family-Friendly Brooklyn Neighborhood—Has Grown in Prestige

One of the most ambitious residential projects is the Residences at the Sawyer. Offering city and river views, as well as room service and a concierge, the condominiums are breaking new ground in pricing and amenities. Set on top of a new 250-room Kimpton Hotel, condos also come with VIP access to Golden 1 Center, a private lounge and a pool and terrace overlooking the arena. One-bedrooms start at $600,000 and three-bedroom penthouses with over 3,300 square feet go up to just over $4 million, says director of sales Christopher Miller, of the Agency Development Group. The building, part of Downtown Commons, is expected to be completed in late 2017.

Sacramento "went from one of the worst real-estate markets to one of the best," says Vivek Ranadivé, a Silicon Valley-based founder of two tech companies, Tibco and Teknekron Software Systems, and owner and chairman of the Kings. He has purchased a condo in the Sawyer.

Real-estate agents and developers say the most desirable neighborhoods are in the urban core—a shift from the prior boom cycle around 2005, when suburban areas with gated developments and highly rated public schools were more popular.

Shelly and Paul Zehnder recently sold their suburban home to move downtown, where they’re in contract to purchase a 1,200-square-foot condo at the Residences at the Sawyer. With all three of their children now out of the house, the couple wants to be closer to the action. As Kings season ticket holders, they liked that they could see the arena from their two-bedroom unit.

Kaycie and Bryan Yong, who both work for the state of California, wanted to be close to downtown to shorten their commutes. With a budget of $300,000, they found that listings were often selling for $50,000 over asking. "It was really competitive," says Ms. Yong, who is expecting her first child in this month.

In November they purchased a new-construction three-bedroom home for $375,000 in McKinley Village, which is a short drive from downtown.

More: Vancouver’s West End Offers Proximity to Green Spaces, Beaches

Local real-estate agents warn that Sacramento’s pace of growth may not be sustainable. Though the city of 485,000 has benefited from expansions in the medical and health-sciences industries, unemployment is 4.5% in Sacramento County, relatively high compared with the national average of 4.1% and San Francisco County’s 2.7%. Mr. Vivas of Realtor.com says the housing market needs more support from the local economy, instead of just demand from other areas.

The frenzied market can be a challenge. Mark and Andrea Goldsmith listed their home just outside of Sacramento in April for $1 million and got an offer six days later. The buyers were a Bay Area couple who offered to pay all cash. When it came time for the Goldsmiths to buy a house closer to the city, they found themselves in bidding wars. In the 20 months they spent looking, they say they saw prices in their target neighborhoods go up by about 20%.

They’re now in contract to pay $862,000 for a three-bedroom, 1,700-square-foot house that was listed for $769,000. "I think it was a risky time to buy," says Ms. Goldsmith, a former home appraiser. "But we plan to live there for 10 or 20 years so I’m not worried about it."