The grocery chain, which operates 1,406 stores in the U.S., also says it's exiting the Chicago market by early 2014 to focus on more profitable business. It operates 72 Dominick's stores in Chicago that have been losing money. The move comes after Safeway said in June it would sell its Canadian stores.

Safeway and other traditional supermarket chains have been working to focus operations and keep costs low to fight off competition from big-box discounters such as Target and Wal-Mart Stores, as well as drug stores and dollar stores that have been expanding their grocery sections.

"These actions will allow us to focus on improving and strengthening our core grocery business," said CEO Robert Edwards. In a call with investors, he added that the company's "strong store base, brand positioning and sales momentum, built from recent retail and loyalty initiatives," will help the company become more profitable.

Edwards said Safeway has received interest in the Dominick's stores from "a number of different parties" and is looking to sell all or as many of the stores as they can as quickly as possible.

Safeway's net income fell to $85.8 million, or 27 cents per share. That compares with $157 million, or 66 cents per share, in the prior-year quarter. Excluding a software impairment charge, net income was 30 cents per share. Analysts expected net income of 16 cents per share, according to FactSet.

The company said so-called "shrink," the loss of inventory due to theft or employee error, hurt results by 6 cents per share. The shrink — mainly related to fresh produce — was due to a change in strategy that focused more on improving sales than controlling shrink, the company said. The strategy has been modified and shrink in the first four weeks of the fourth quarter has fallen back in line with expectations.

Safeway expects to get a cash tax benefit of $400 million to $450 million for exiting the Chicago market. That will partly offset its cash tax expense related to selling its Canada stores in June.

Safeway also expects a multi-employer pension withdrawal liability which is generally paid over 20 years. The company expects to pay up to $375 million quarterly and the value of related tax benefits is up to $145 million.

For the year, the company now expects net income of 93 cents to $1, from a previous range of $1.02 to $1.12 per share. That excludes proceeds from selling its Canada business. Excluding the Dominick's business, the company expects net income of $1.05 to $1.12 per share. Analysts predict $1.09 per share.

Shares rose $2.13, or 6.8 percent, to $33.70 in aftermarket trading after closing up 77 cents at $31.57. The stock has traded between $15 and $32.72 over the past 52 weeks.