Home Depot has closed its seven remaining big-box stores in China, its only operations outside North America, to focus on online sales and specialty stores in that country, the retailer announced Thursday night.

The Atlanta-based home improvement retailer had stores in China for six years, but was never able to figure out how to translate its D.I.Y. focus to that market.

The closings will affect about 850 employees, Home Depot said in a statement. About 170 will work on new retail formats, including online sales, in China.

Earlier this year, Home Depot opened two specialty stores in Tianjin, one for paint and flooring, and another for its Home Decorators Collection.

“We do think, based on Chinese customers’ needs and shopping preferences, these stores are a better fit,” said Paula Drake, Home Depot spokeswoman. “We are pleased with them so far.”

The company remains interested in China, chairman and CEO Frank Blake said in a statement, and will keep a research and development team in that country.

Home Depot will take a hit of $160 million related to the closings.

The retailer acquired 12 stores in China from Home Way in December 2006 for an undisclosed sum. It closed two stores in 2009, two stores in 2010 and one store in 2011.