Zillow Group Inc. reached an agreement to sell about 2,000 properties from the home-flipping business that it’s winding down.

New York-based investment firm Pretium Partners will purchase the homes, according to a person with knowledge of the matter.

Pretium owns more than 70,000 rental houses in the U.S., making it the second-largest single-family landlord behind Invitation Homes Inc.

“Pretium has long been committed to providing quality housing options for residents,” the company said in a statement. “At a time when move-in-ready homes are in short supply, we continue to invest in communities and improve access to housing throughout the U.S.”

Zillow, based in Seattle, announced last week that it’s pulling the plug on its tech-powered flipping operation after an ambitious effort to transform the company collapsed when its vaunted pricing algorithms proved unequal to the task. The company plans to take writedowns of as much as $569 million and reduce its workforce by 25 percent as it winds down the business in coming months.

The decision to abandon home-flipping came as the company’s third-quarter results showed it lost more than $380 million in the operation, called Zillow Offers.

The business hit a major snag in recent months as Zillow tweaked its algorithms to make more aggressive offers, causing it to overpay for houses just as the heated U.S. real estate market began to cool slightly.

Now, Zillow has roughly 18,000 homes to unload in coming months.

“We are focused on making the homes we are listing for sale, which will represent a tiny fraction of all homes sold this year nationwide, available to movers as quickly as possible,” a representative for the company said in a statement. “As we wind down our iBuying operations, we continue to sell homes the way we always have, which includes marketing them on the open market to sell them to all types of buyers such as individuals and families, institutional or individual investors, and nonprofits.”

For Pretium, the deal with Zillow lets the company add to its portfolio of homes at a time when rents on single-family properties have been surging. As soaring home prices push ownership out of reach for many families, rental properties have drawn Americans looking for more space in the suburbs.