Think buying a house is like a combat sport these days? Try building one.

Building sites are in short supply, the cost of materials is soaring and there's a dearth of skilled subcontractors at a time when sales are off the chart.

So are prices. The median price of a new house in the Twin Cities has risen more than $4,000 each of the past three months, as builders struggle to balance a surge in demand with volatile costs that are forcing many to put a lid on sales.

"Demand is unlike anything we've ever seen," said Jamie Tharp, Minnesota division president for Pulte Homes, one of the metro's biggest builders.

Buyers are being pitted against buyers as builders devise unusual tactics aimed at limiting sales, including waiting lists, caps on sales and e-mail lotteries that blindly pick who gets to buy the home.

It's not just new home buyers who are feeling the heat. Rising prices and a lack of new houses could inadvertently further squeeze people already struggling to afford an existing entry-level home by making the most affordable prospects unavailable because their owners can't trade up.

"What concerns me is the impact on overall affordability in the market, as a lack of attainable housing was already alarming in the Twin Cities," said Danielle Leach, Midwest regional director for Zonda, a market research company that tracks new housing. "Demand is simply outpacing supply."

Builders are already working at a feverish pace. Housing First Minnesota, the trade group that represents area homebuilders, said this past week that builders were issued more than 760 single-family permits this month. While that was 60% higher than a year and a nearly two-decade high, it's still not enough to keep pace with a surge of buyers, especially millennials who are taking advantage of the lowest financing rates in a generation.

On Thursday, Freddie Mac said the average 30-year fixed-rate mortgage was just 2.98%, about a quarter percentage point below last year at this time.

New home listings in the Twin Cities are already falling at about the same rate as existing homes. At end of last month there were just 1,285 new houses for sale in the Twin Cities, half as many as last year, according to the Minneapolis Area Realtors. (That doesn't include new homes bought directly through builders and never listed on the Multiple Listing Service.)

Meanwhile, constructions costs are so volatile, and the shortage of skilled workers to build those houses is so dire, that many builders are leery of taking an order for a house that might cost more to build than they promised the buyer or take longer to build than planned. And that means many builders have retreated from the once-common practice of building an inventory of new houses that could be sold at a future date.

That means buyers are going to have to wait. At the current sales pace, there are now only enough finished, vacant new houses to last a little more than two weeks, Leach said. Normally, builders maintain a two- to 2 ½-month supply of new houses.

"Builders are selling through their lot inventory faster than they can replace it," she said. "Which means land pricing is also on the rise."

Rising land prices are also making it difficult for builders to set pricing several months out, so many builders are no longer advertising their base prices on their websites, in advertisements and on the floor-plan sheets in their sales models, enabling them to increase prices as needed, Leach said.

Her latest survey of new subdivisions in the Twin Cities shows that during January the month-to-month increase in the median sale price of a new house was $4,000, rising to $5,000 during each of the next two months. She said some builders are blaming lumber prices for $25,000 to $50,000 increases in the base price of a new house since the beginning of the year.

Lumber has been especially expensive and difficult to get, but builders are also having trouble accessing other important materials and supplies, including appliances, plumbing fixtures and lighting that were once readily available but might now be on back order for several months.

"We're trying to balance how much we increase prices," said Tharp, the Pulte Homes division president. "But we cannot and are not raising prices fasts enough to cover cost increases."

In some communities, she said, the company is only releasing a certain number of homesites each month and is keeping a list of interested buyers. If they have more buyers than homesites, as has been the case at its Del Webb Bellwether subdivision in Corcoran, the company in some cases will pick a buyer at random through an electronic lottery.

Chris Contreras, vice president of operations for M/I Homes, the region's second-largest builder, said some builders are making buyers agree to renegotiate the sale price to help cover unexpected increased costs. His company has opted to avoid committing to deals without firm price commitments from their suppliers.

For example, in the past the company has been able to lock lumber prices for six months. Today it's 30 days, he said, but in some parts of the country it's just two weeks.

The complexity of the situation for builders today contrasts with the 2006 building boom. While the earlier period also saw unbridled demand, there was enough land, labor and materials for builders to stockpile completed homes.

"Most homebuilders are concerned about meeting the current backlog than building inventory," he said. "The market has just turned upside down."

Brooke Boss, a Twin Cities sales agent who works with new home buyers, spent part of last week scrambling to get a deal finalized by May 1 when a $10,000 price increase was set to kick in. She also has clients who a month ago got a bid to build a house for $493,000. Now, the builder has told them it will cost an additional $22,000.

"It has gotten increasingly crazy over the past couple weeks," she said. "It's just nuts."

She said that in the north metro, some of the national builders are hitting the brakes on construction because they won't have lots available for another three to four months. A smaller local builder she works with recently had two clients engaged in a literal road race to deliver a check to a sales rep in Hugo to put a hold on a lot they both wanted to buy in Vadnais Heights.

"One of them beat the other by 10 minutes to reserve the lot," she said. "It's wild."

Jim Buchta • 612-673-7376