Walgreen Co posted a better-than-expected quarterly profit as the drugstore chain's restructuring efforts paid off even as consumers cut back on discretionary buying, sending its shares up 5 percent in premarket trading.

The company also said it filled 4 percent more prescriptions in the quarter than a year earlier, while retail competitors filled 1 percent fewer prescriptions.

Walgreen earned $640 million, or 65 cents per share, in the fiscal second quarter that ended February 28, compared with a profit of $686 million, or 69 cents per share, a year earlier.

The company is a few months into a major overhaul that includes job cuts, store remodeling and moving some pharmacy work to centralized locations to cut costs.

Excluding items related to that restructuring, Walgreen earned 69 cents per share, compared with the average analyst estimate of 66 cents per share, according to Reuters Estimates.

Sales rose 7 percent to $16.5 billion, while sales at stores open at least a year rose 1.3 percent. Sales and earnings were both hurt because 2009 had one less day than 2008, which was a leap year.

Walgreen also spent more on promotions to encourage customers to buy nonprescription items.

In the past, drugstores could typically charge more than chains such as Wal-Mart Stores Inc because customers were looking for convenience, not value. Now Walgreen and its rivals are selling their own lower-priced brands and putting more items on sale to keep shoppers coming back during the recession.

Walgreen is promoting paper towels, tissues, food and other items in new advertising, touting itself as a place to shop for Affordable Essentials.

The company took 6 cents per share in charges for its Rewiring for Growth restructuring program during the quarter, and saw 2 cents per share in cost savings.

Walgreen shares were $25.30 on Monday in premarket trading, up from Friday's New York Stock Exchange close of $24.29.

(Reporting by Brad Dorfman and Jessica Wohl; Editing by Maureen Bavdek)