The warning from the country's top seller of power tools, flooring and lawnmowers overshadowed its stronger-than-expected third-quarter results and a higher annual sales forecast.

The company's shares fell nearly 4 percent on Tuesday morning, but recovered most of their losses to trade marginally down later in the session.

After years of a steady recovery from the U.S. housing market meltdown in 2008, there are signs that housing demand is slowing as mortgage rates climb higher, hurting purchasing power.

Many large homebuilders including D.R. Horton and Lennar have already warned of slowing home sales, as the companies also face supply constraints.

"(The housing market) has recovered a lot from the financial crisis, but not all the way," Home Depot Chief Financial Officer Carol Tomé said in an interview, blaming the lack of supply of homes.

"The steepness of the recovery is going to slow as we reach full recovery," she said.

On a conference call with analysts, Tomé said home starts and home price increases were "moderating" but other drivers of home improvement spending supported Home Depot's higher sales and earnings outlook for fiscal year 2018.

The Atlanta-based retailer now expects sales to rise 7.2 percent in the year ending January, compared with an earlier forecast of 7 percent growth. It raised its earnings forecast to $9.75 per share from $9.42.

Sales at U.S. Home Depot stores open for more than a year surged 5.4 percent during the third quarter ended Oct. 28, above analysts' expectations of a 4.38 percent increase, according to IBES data from Refinitiv.

"The solid top-line proves a laser-focus on home sales doesn't paint the entire picture of home improvement demand," Jefferies analyst Randal Konik said in a note.

Costs from tariffs on Chinese imports — expected to rise to 25 percent from next year — is also likely to lead to some product price hikes, Home Depot said.

The company said potential higher tariffs could impact 3.5 percent of the goods it sources from outside the United States, up from 1 percent currently.

Home Depot's third-quarter net earnings rose 32.4 percent to $2.87 billion, or $2.51 per share. That beat analysts' average estimate of $2.26 per share.

Net sales overall climbed 5.1 percent to $26.30 billion and also exceeded analysts' forecasts.

(Additional reporting by Nandita Bose in New York; Editing by Bernadette Baum, Sai Sachin Ravikumar and Maju Samuel)

By Aishwarya Venugopal