May brought a surprise burst of energy to the Portland-area real estate market after a rocky winter and uneven spring.

Home sales rebounded to their highest level in nearly two years, according to new numbers from the listing service RMLS. The median sale price, meanwhile, climbed to a record of $420,000 -- up from $417,900, set last June.

It’s unclear whether the sunny outlook will stick. But real estate agents say buyers and sellers alike are adjusting to a new normal after the red-hot turned lukewarm over the last two years, and their expectations are starting to align.

“Buyers started to realize they could take their time shopping around,” said Alex Roy, a broker with John L. Scott Real Estate in Southeast Portland. “And as homes were sitting around for longer, sellers realized they couldn’t push up prices.”

RMLS reported that nearly 3,000 Portland-area homes were sold in May, the most since August 2017. Another 3,300 went under a sale contract during the month, foreshadowing strong sales in the months to come.

Sales were helped along by favorable mortgage rates, which have been falling since November. This week, the average rate for a 30-year fixed-rate mortgage was 3.84%, approaching levels not seen since 2017.

If May’s sales rate continued, it would take only 2.1 months to sell the 6,200 homes on the market, numbers that suggest a seller’s market remains.

But sellers have seen their power wane nonetheless. The average home sold in May spent nearly seven weeks on the market first, about a week and a half longer than in May 2018.

Buyers are getting into fewer bidding wars, and there’s less pressure to make an offer on the spot, said Dustin Miller, a broker with Windermere Realty Trust in Lake Oswego.

“We’re kind of taking our time,” Miller said. “We don’t have to rush.”

The median sale price , which had barely budged from September to April, jumped to $420,000 in May. That marked a 2.7% increase compared with a year earlier and topped the previous record high from last June.

-- Elliot Njus

enjus@oregonian.com; 503-294-5034; facebook.com/elliotnjus

Visit subscription.oregonlive.com/newsletters to get Oregonian/OregonLive journalism delivered to your email inbox.