Nik Rajkovic / news@whmi.com

Dollar Tree will close nearly 1,000 stores and swung to a surprise fourth quarter loss as the discount retailer took a related $1.07 billion goodwill impairment charge.

Shares tumbled 15% before the opening bell Wednesday.

Dollar Tree plans to close about 600 Family Dollar stores in the first half of this year and 370 Family Dollar and 30 Dollar Tree stores over the next several years.

Dollar Tree acquired Family Dollar for more than $8 billion almost a decade ago after a bidding war with rival Dollar General, but it has had difficulty absorbing the chain.