Long Island home prices jumped in Nassau County and fell in Suffolk County last month, a new report shows.

The median closed sale price in Nassau was $480,000 in May, up 6.7 percent from a year earlier, the Multiple Listing Service of Long Island reported Thursday.

In Suffolk, the median price dropped 1.4 percent from a year earlier, to $335,000.

In both counties, buyers face a slim supply of listings. The number of homes for sale fell year-over-year by 18 percent in Nassau, where just under 5,200 were on the market, and 16 percent in Suffolk, where brokers listed 7,639 homes.

“Inventory is continuing to shrink and shrink,” said Steven Weizel, sales manager with the Farmingdale office of Century 21 American Homes. “There’s just no availability, and multiple offers are driving the selling prices up.”

Weizel said he advises buyers to be “as flexible as they can be” not only in terms of price, but also in other ways, such as allowing the sellers to move out whenever they wish. Some even write letters declaring their admiration for the home and their dreams of raising a family there.

advertisement | advertise on newsday

“We’ve actually had some sellers say, ‘I just loved this letter,’” he said. “So they have to get a little creative sometimes.”

Closed sales activity grew 6.2 percent annually in Nassau and 16.2 percent in Suffolk.

The number of signed contracts for future sales increased about 10 percent in both counties.

“It’s a combination of pent-up demand and people having more confidence in the economy,” said Eric G. Ramsay III, broker and owner of Ramsay Realtors in Bay Shore. Moreover, he said, rising interest rates are prompting buyers to close deals before they increase further.

The average 30-year mortgage rate was 3.91 percent last month, up 0.47 percentage points from a year earlier, mortgage giant Freddie Mac reported Thursday.

Rising rates could also be putting a damper on prices, since higher borrowing costs mean buyers have less money to spend on the purchase.

“I’ve had cases where people were qualified [for a mortgage] before and now they aren’t qualified,” so they have to negotiate the purchase price down, Ramsay said.

CORRECTION: Closed home sales rose 6.2 percent annually in Nassau County and 16.2 percent in Suffolk. An earlier version of this story misstated sales activity.