Demand for homes in the D.C. region waned in July, perhaps the first sign that buyers are becoming frustrated with the lack of inventory on the market.

Or it could be this is the typical slowdown that occurs ahead of a presidential election as buyers wait to see what a change in administration will bring.

Whatever the reason, sales were lower than a year ago for the first time in 19 months. The 5,045 homes sold in July were 3.4 percent fewer compared to July 2015, according to data provided by ShowingTime RBI based on listing activity from MRIS, the area’s multiple listings service.

The 5,267 pending sales — homes that were under contract but the deal had not closed — were up 0.9 percent compared to July 2015. It’s the most homes under contract for the month of July since 2005, a sign that last month’s drop in sales may be only temporary.

July’s slowdown in sales might be attributable to low inventory. The 6,225 new listings that came on the market last month were 8.6 percent fewer than July 2015. The 10,943 active listings were 12.9 percent fewer than July 2015, the third month of annual declines for this category. Faced with a limited number of choices, buyers may be deciding to sit on the sidelines and wait for something better to come along rather than settle for a home that’s less than ideal.

The median price of a home sold in the D.C. region last month edged up to $435,000, the highest price for the month of July since 2007. Yet, it was just $2,500 higher than July 2015, a less than 1 percent increase, further indication that prices seem to be softening.

Condos saw the biggest gains, with a 4.1 percent annual increase to $302,000. Single-family detached and townhouses were flat at $545,000 and $407,250 respectively.

While prices in the region as a whole have been flat, certain jurisdictions have fared better or worse than others.

Prince George’s County experienced significant price gains in July. The median price jumped to $270,000 last month from $238,000 in July 2015. Maryland’s Frederick County also saw a big jump in its median price, rising to $300,750 from $273,500. Alexandria’s median price went to $536,000 from $489,000. Loudoun County’s median price climbed to $450,000 from $428,500. Manassas City’s median price rose to $257,500 from $245,000.

Charles County’s median price was up to $271,500 last month from $259,950 in July 2015. The District’s median price increased to $570,000 from $550,000. Fairfax City’s median price grew to $515,000 from $500,000.

Anne Arundel County’s median price edged up to $323,000 last month from $319,000 in July 2015. Montgomery County’s median price rose to $425,000 from $419,900. Prince William County’s median price ticked up to $337,000 from $335,000. Arlington County’s median price increased to $627,000 from $625,000. Fairfax County’s median price had a slight gain, moving to $492,500 from $491,827.

Howard County saw the biggest drop in its median price, falling to $415,000 from $439,950. Falls Church’s median price sank to $708,000 from $729,888. Manassas Park’s median price slipped to $265,000 from $270,000.

The median days on the market last month for the region was 17 days, two days lower than last year. Homes sold fastest in Falls Church where half were off the market in eight days or less. The District was also under two weeks, with half of its homes selling in 11 days or less. Homes lingered longest in Alexandria and Montgomery with median days on the market of 23 and 22 days respectively.