PLEASANTON -- Supermarket giant Safeway announced Thursday it will sell its Chicago stores by the end of the year, another sign that the nation's second-largest grocery chain is beginning to shrink in the face of competition from nonunion big-box retailers and regional chains.

The announcement, made during Safeway's quarterly earnings report, follows the grocer's sale of its Canadian operations and an attempted hostile takeover by investors who had amassed a significant chunk of stock, saying shares were undervalued and weighed down by unprofitable regions -- including Chicago.

Despite its relative success in a highly competitive industry, Safeway continues to feel pressure from Wal-Mart and Target, emerging regional grocers such as Sprouts Farmers Market and Amazon's expanding grocery business.

Some analysts said Safeway's Chicago exit from its 72 Dominick's stores was a smart belt-tightening move.

"This means they are getting rid of trouble," said industry analyst David Livingston. "This is good news. It was no secret that Chicago was a big thorn in their side."

Safeway's downsizing is possibly the boldest move by CEO Robert Edwards since he took the job in May. Unlike his predecessor, Steve Burd, who built Safeway's national footprint through a number of risky acquisitions, Edwards said Thursday that he's looking to trim the fat.

Selling Dominick's "will eliminate a noticeable drag on our financial results," Edwards said on a call with investors. Safeway plans to sell all of the stores by the end of the year.

Safeway estimates gaining a tax benefit of $400 million to $450 million from the sale of Dominick's.

Safeway's margins took a hit over the past three months, with profit sliding 58 percent. Safeway reported net income of $65.8 million, or 27 cents a share, down from $157 million, or 66 cents a share, a year earlier.

"We did not find the quarterly results entirely satisfactory," Edwards said.

Sales inched up 1.1 percent to $8.62 billion from $8.53 billion for the same three month period ending in September a year ago. Analysts had projected profit of 16 cents a share on $8.25 billion in revenue this quarter.

Stocks closed up 2.5 percent Thursday to $31.57. A year ago, the shares were valued about half that at $16.55.

Safeway expects to make about $4 billion in proceeds from the sale of its Canadian stores -- a $5.6 billion deal with Canada's second-largest grocery chain, Empire. Safeway executives said about half the proceeds will go to pay down debt and the remainder will be used to buy back stock.

Edwards said the decision to close the Canadian stores and Dominick's was part of a cost-savings review process -- and other sales or closures may follow.

FILE- In this Thursday, April 26, 2012, file photo, a Safeway online shopping advertisement is shown at a Safeway store in San Francisco.
FILE- In this Thursday, April 26, 2012, file photo, a Safeway online shopping advertisement is shown at a Safeway store in San Francisco. (Paul Sakuma/AP Photo)

"We're very good at cost reduction, and it's been a strength of the company for years," Edwards said on a call with investors. "And it's something that we're looking at now."

The CEO added that shedding the unprofitable Chicago stores will allow Safeway to redirect its resources to regions that are making money -- such as the Bay Area. Safeway will move into in the new Alameda waterfront shopping center and has plans for new stores in Walnut Creek and Hercules.

Contact Heather Somerville at 510-208-6413. Follow her at Twitter.com/heathersomervil.