Richfield, so quiet and unassuming. Lots of ramblers. Girdled by highways.

Yet for the second year in a row, the first-ring suburb was the hottest housing market in the Twin Cities, according to an index compiled by the Star Tribune. Mounds View and Champlin ranked second and third among 103 cities surveyed, while low-key Little Canada and Brooklyn Center posted the biggest gains from 2016.

The index tracks prices, time on the market, seller discounts and the number of foreclosures and short sales for houses sold through the Minneapolis Area Association of Realtors.

The trends are clear: The hottest markets in 2017 were first-ring suburbs and inner-city neighborhoods dominated by the most affordable houses near key commuter routes and within walking distance to shops and restaurants.

With buyers outnumbering sellers in those markets, the pickings were slim and the competition fierce, causing steep price increases — and big gains on the index — in places like Roseville, Robbinsdale and Little Canada, which went from 102 on the index in 2016 to 32 last year, the biggest leap.

On nearly every measure, though, Richfield reigned. Houses there sold faster than anywhere else in the metro with an average market time of 29 days last year, 11 days faster than in 2016.

And buyers weren’t shy — on average they made full-price offers, causing the average per-square-foot sale price to increase more than 10 percent to $147.

“With inventory this low in Richfield, if buyers don’t look in other areas they will not have enough options,” said Terry Ahlstrom, a sales agent with Edina Realty who lives and works in Richfield, where many longtime owners are reluctant to put their houses on the market.

“If you sell, you still need a place to move on to, which brings you right back to the inventory problem.”

For all the communities at the top of the list, the key was location, location, location — namely proximity to a big city and freeways.

Little Canada is situated along the north edge of St. Paul and is bisected by Interstate 35E, while Richfield borders Minneapolis and is divided by I-35W.

For Vanessa Anderson and other buyers in Little Canada, being centrally located means an easy commute.

The new 4,500-square-foot house in Little Canada she and her husband bought is just five minutes from I-35E, so it’s all freeway for the drive to her office in Bloomington and her husband’s job in North Oaks.

“We’re close to St. Paul, but we don’t feel like we’re living in the city,” Anderson said. “And we wanted new construction, which is difficult to find in an older town like Little Canada.”

Like Richfield, Little Canada has experienced a lot of redevelopment, yielding plenty of houses with modern amenities. Steve Peters of Masterpiece Homes in Little Canada said he’s built 172 townhouses and single-family houses in the city over the past two decades. “We get a lot of two-income families who commute to work and want to stay close,” Peters said.

That proximity is paying off for home sellers, with price gains there besting even stellar Richfield.

The average price per square foot in Little Canada increased 16 percent over its previous four-year average, while the share of distressed sales fell from 9 percent in 2016 to nearly zero last year. And houses sold quickly — the average days on market dropped 24 days.

Buyers also flocked to the suburb next door, Rose­ville, where the average market time fell 20 days and the average price per square foot increased 11 percent.

After several years of stagnant sales and prices, a few far-flung communities showed strong price gains, particularly along the I-94 corridor.

In Dayton, which is about 45 miles northwest of downtown Minneapolis, nearly 70 percent of the sales were entry-level new houses, which helped boost the average price per square foot by a third, making it the second-largest increase in price per square foot last year.

That put Dayton in a tie with Crystal in ninth place on this year’s index, up from No. 41 a year ago.

Several suburbs that are dominated by upper-bracket homes remained at the bottom of the list. That included Medina, Edina and Orono, where there’s an abundance of $1 million-plus listings but a shortage of buyers.

Meanwhile, first-time buyers replaced investors in communities that just a year ago were still swimming in foreclosures and short sales.

In Brooklyn Center, the number of distressed sales dropped by half, house prices hit new highs and the average market time was the second-fastest in the metro. Though sellers saw big price increases, it was still the third least expensive city in the index.

The pattern was similar in St. Paul, where the share of distressed sales declined by half, causing a five-spot gain to No. 55 on the index.

The average market time dropped 11 days, and the price per square foot increased more than 20 percent driven by deep demand in the North End and Payne/Phalen neighborhoods, both of which saw price increases of about 30 percent.

Of the two cities at the heart of the metro area, Minneapolis fared far better, rising to 16th on the index from 31st a year ago.

That leap was shaped by big gains in several neighborhoods, including Hawthorne and Jordan, where investors and first-time buyers drove sales.

The average price per square foot in those neighborhoods increased more than 60 percent and the share of distressed sales fell dramatically.

“Quite a few of the homes this past year were investor rehabs, which helps the overall rise in prices,” said Deb Wagner, a sales agent at Greenway Homes in north Minneapolis. “It’s getting to be slim pickings for the investors as there are very few foreclosures at this point.”