In this Tuesday, Aug. 21, 2018 photo, a home has a sold sign in North Reading, Massachusetts. Credit: Elise Amendola | AP

Sales of single-family homes in Maine showed strong gains in both their prices and the number sold in July, according to data released Wednesday by Maine Listings.

They also topped national trends.

Maine Listings reported 1,864 homes were sold last month, up 9.65 percent from July 2017, while the median sales price during the year rose 9.22 percent to $225,000. The median sales price indicates that half of the homes sold for more and half sold for less.

The numbers compared July 2018 to July 2017.

“For-sale inventory is coming onto the market, but statewide we’re seeing 12 percent fewer homes for sale than a year ago.” Kim Gleason, president of the Maine Association of Realtors, said in a statement.

She said home prices continue to rise, which is an advantage for current homeowners, but rising prices can become an obstacle for first-time buyers.

“In some Maine markets, price gains are outpacing income growth because of consistently low for-sale inventory levels,” she said.

During the period from May 1 to July 31, Piscataquis county experienced the highest rise in units sold from that three-month period in 2018 over 2017 with 32 percent more units sold. However, the median sales price fell 3.4 percent.

Aroostook was second with 21 percent more units sold at a price 5 percent higher than the three months in 2017.

Penobscot County’s unit sales rose only 2.27 percent year-to-year over the three months, and the median sales price fell 3.33 percent.

Cumberland County’s unit sales rose 3.03 percent, and the median sales price rose 8.47 percent.

Maine’s July numbers buck the national trend in a separate set of numbers also released today by the National Association of Realtors. Those showed decreases for the past four months until July in single-family home sales. Total existing-home sales, which include single-family homes, condominiums, townhouses and co-ops, decreased 0.7 percent to 5.34 million nationwide in July from 5.38 million in June. Sales are now 1.5 percent below the same time a year ago.

“Led by a notable decrease in closings in the Northeast, existing home sales trailed off again [in July], sliding to their slowest pace since February 2016 at 5.21 million,” Lawrence Yun, chief economist for the National Association of Realtors, said in a prepared statement. “Too many would-be buyers are either being priced out, or are deciding to postpone their search until more homes in their price range come onto the market.”

Follow the BDN Business page on Twitter @BDNbiz.

Follow the Bangor Daily News on Facebook for the latest Maine news.