Coffee and doughnut chain Tim Hortons is closing its Kandahar outlet after five years in the war zone, shuttering its store on a Canadian military base as the country's troops leave Afghanistan.

Opened on Canada Day 2006, the trailer-like restaurant catered to about 3,000 Canadian troops on a combat mission that was little loved at home. That mission is to wrap up this year, although a 950-strong force will stay to train Afghan soldiers and police until 2014.

It has been an absolute privilege and honor for Tim Hortons to ... bring a little taste of home to the brave Canadian soldiers serving overseas, Chief Executive Paul House said in a statement that noted sales of 4 million cups of coffee, 3 million doughnuts and 300 containers of supplies.

Named for its hockey player founder, Tim Hortons dominates the coffee and light-lunch trade in its home market, blanketing the country with its spartan yellow and red stores. It says it brews eight in ten cups of coffee sold in Canada.

For about a decade, the restaurant chain was owned by Wendy's International, but the U.S. chain spun off the business in 2006. When Tim Hortons moved its headquarters back to Canada, Prime Minister Stephen Harper gave a speech welcoming the company home.