Sales of U.S. new homes recovered in April after slumping in the previous two months. But Americans are still buying new homes at a slower pace than they did a year ago.

The Commerce Department said Friday that sales of new homes rose 6.4 percent last month to a seasonally adjusted annual rate of 433,000. That compares with an upwardly revised annual pace of 407,000 in March, when purchases fell 6.9 percent. Buying had dropped 4.4 percent in February, in part because of winter snowstorms.

Demand for newly built homes remains one of the missing pieces of the nearly 5-year-old recovery from the Great Recession. A lack of affordability has limited buying around the country. Sales of new homes are running at roughly half the rate of a healthy real estate market.

Warmer weather has yet to heat up the housing market after a harsh winter slowed sales in January and February. Higher prices and mortgage rates over the past year have sidelined many would-be buyers.

Sales during April surged in the Midwest and edged up in the South. Home-buying was flat in the West and fell in the Northeast.

Yelena Shulyatyeva, an economist at BNP Paribas, noted that the 47.4 percent increase in Midwest sales likely came from the start of the spring buying season and that similar levels of growth are “not likely to continue.”

“The broader trend remains one of weak underlying demand,” Shulyatyeva said in a client note.

New-home sales have declined 4.2 percent over the past 12 months.

The median sales price, which can be volatile, fell a slight 2.1 percent during the past month to $275,800.

Buying has been slow across much of the country after climbing in the first half of 2013. Last year’s gains and a limited supply of homes pushed up prices to levels that strained household budgets for potential buyers.

Sales of existing homes in April rose 1.3 percent from March to a seasonally adjusted annual rate of 4.65 million, the National Association of Realtors said Thursday. Purchases of homes over the past 12 months have dropped 6.8 percent. In a healthy housing market, roughly 5.5 million existing homes are purchased each year.

The median price for an existing home has risen 5.2 percent to $201,700.

Home sales growth over the past year has occurred primarily among homes worth more than $750,000. Buying fell during the same period for homes worth less than $250,000, which make up the majority of all purchases.

Much of the increase in construction has been in the apartment sector, a sign that builders expect fewer buyers and more renters. After the housing bust and Great Recession, Americans have been coping with flat wages and job insecurity, making it hard to save for a down payment. The home ownership rate was 64.8 percent at the start of the year, down from a peak of 69.2 percent during 2004.

New homes usually represent about 20 percent of all homes sold. That figure has fallen recently to 10 percent, according to real estate data firm Zillow.

An index of builder confidence for this month fell a percentage point to 45, the National Association of Homebuilders and Wells Fargo reported Thursday. A reading below 50 indicates that builders consider the conditions for new construction to be poor. The index had been above 50 from June through January.