Homebuilders in the Twin Cities metro are having their best summer in more than a decade — permits to build single-family houses outpaced last year for the second month in a row.

During June, homebuilders in the metro were issued 595 permits to build 1,061 housing units, according to data compiled by the Keystone Report for Housing First Minnesota. That included 558 single-family permits, 13 percent more than in June last year, and enough permits to build 503 attached units, a 30 percent increase over last year.

"Builders are still making up for the slowdown caused by the long winter," Tom Wiener, president of Housing First Minnesota, said in a statement. "Home buyers are feeling good about the economy and ready to buy."

Apartment developers are also feeling optimistic even after several record-breaking years and 2018 is expected to be no exception. Apartment construction is on pace to be the busiest ever.

After a significant decline in May, multifamily permits, which can be volatile from month to month, rebounded in June. They represented a more typical 47 percent of all planned units during June, mostly market-rate apartments.

The biggest projects receiving permits last month were in Edina, where Stevens Construction is building 165 units, and in Golden Valley, where Greystone Construction plans to build 98 units.

In Savage, Eagle Building pulled a permit to build 54 units and F. Kason Inc. pulled a permit for 42 units in Forest Lake.

Single-family construction is ramping up in large part because there's a shortage of existing houses on the market. Rising resale prices are narrowing the gap between new and used homes in some parts of the metro.

At the current sales pace, there were only enough houses on the market in the metro during May to last 2.2 months, a 12 percent decline compared with last year, according to the Minneapolis Area Association of Realtors. That shortage is putting upward pressure on prices. The median sale price of all closings during May was $271,000, an 8.4 percent annual increase.

"While housing inventory is picking up it is still well below where it should be," said David Siegel, executive director of Housing First Minnesota. "Data and demand shows single-family housing is still the most desired by home buyers and it's clear we need more of it."

For the month, Lakeville issued the most permits, 43, followed by Otsego with 34 permits and Woodbury with 30 permits.

Housing First Minnesota, formerly known as the Builders Association of the Twin Cities, is a trade association of more than 1,300 builders, remodelers, developers and industry suppliers throughout the state.