Checking out at Lowe's

Lowe's (LOW - Get Report) said Thursday it will acquire Maintenance Supply Headquarters in a $512 million all-cash deal as it aims to diversify to better compete with Home Depot (HD - Get Report) . 

The acquisition is expected to be completed in the quarter ending July and add to Lowe's earnings in the year ending next February. 

The Mooresville, N.C.-based home improvement retailer distributes building materials and supplies through stores in the United States. Lowe's took financial advice from Goldman Sachs and counsel from Hunton & Williams.

Houston-based Maintenance Supply Headquarters took advice from Crutchfield Capital and counsel from Porter Hedges.

In November Lowe's bought Central Wholesalers Inc., a Laurel, Md.-based apartment supplier with business in the mid-Atlantic and Northeast. Terms were undisclosed.

Lowe's faces fierce competition from Atlanta-based Home Depot, which owns home improvement warehouse stores worldwide.

Both retailers are benefiting from the U.S. housing recovery and they also are expected to gain from the woes of Freeman Spogli & Co.-backed HHgregg IncThe Indianapolis-based appliances, electronics and furniture retailer announced plans on March 2 to close three of its distribution centers and 88 stores as part of an out-of-court restructuring process. 

Lowe's was tipped as one of several possible acquirers of Wayfair (W - Get Report) by Wedbush Securities analyst Seth Basham in an April 19 note.

In 2015 Lowe's formed a strategic alliance with Hitachi Koki, a Japanese power tool and life science equipment maker in which KKR (KKR - Get Report) holds a controlling stake.

David Marcus contributed to this report.