The increases follow a nationwide trend of rapidly rising home prices.

Nationally, home prices rose 0.9 percent in April and are 5.5 percent higher than a year prior. The smallest annual gain reported among the 20 cities included in the index was 4.1 percent, roughly twice the rate of inflation, in New York.

But Seattle and Portland have consistently led the pack in recent years.

The ever-climbing prices come as buyers are competing over a slim supply of homes on the market. Current homeowners are staying put rather than moving up to a more expensive home.

Homebuilders, meanwhile, are still less active than they have been historically. That means fewer new homes to keep up with a growing population.

Housing market observers have long speculated a looming increase in mortgage rates could slow demand, in turn putting the brakes on home prices.

But rates have been volatile, dropping in recent weeks to their lowest point of the year.

And David M. Blitzer, chairman of the committee that publishes the Case-Shiller index, suggested Tuesday the rising rates could have the opposite effect.

“If mortgage rates, currently near 4 percent, rise further, this could deter more people from selling and keep pressure on inventories and prices,” Blitzer said in a statement. “While prices cannot rise indefinitely, there is no way to tell when rising prices and mortgage rates will force a slowdown in housing.”

In Portland, the median home-sale price was $385,000 in April, according to the Regional Multiple Listing Service. It rose to $388,000 in May.