Walgreen Co. (WAG) posted a 1.6% drop in fiscal fourth-quarter profit as sluggish front-end sales offset growth in revenue and prescription sales.

Shares jumped 9.4% to $37.40 in pre-market trading, as earnings topped analysts' expectations. The stock through Monday's close is up 39% this year as the nation's largest drugstore chain works to cut costs, remodel stores and streamline the number of items it sells, to make shopping more convenient for customers.

Walgreen reduced its number of store openings to focus on these projects, and analysts and investors have been waiting for signs of improvement in profitability.

"The company continues to make incremental progress on the cost front, which should continue as the pace of store openings slows," J.P. Morgan analyst Lisa Gill said in a research note to investors Tuesday morning.

For the period ended Aug. 31, Walgreen's profit fell to $436 million, or 44 cents a share, from $443 million, or 45 cents a share, a year earlier. The results included gains of 4 cents and 5 cents, respectively.

Net sales during the fiscal quarter rose 7.6% to $15.7 billion, as sales at stores open at least a year increased 2.4%. Same-store sales increased 4.5% in the pharmacy and declined 1.4% for other merchandise.

Prescription sales, which accounted for two-thirds of sales, increased 9% overall.

Analysts polled by Thomson Reuters were expecting earnings, excluding items, of 39 cents a share on revenue of $15.68 billion.

Gross margin rose to 27.7% from 27.6% on stronger retail pharmacy margins, helped by increased generic-drug sales. Nonretail operations and added inventory costs, however, held down the margin rise.

Drugstore chains' promotion of discount drug programs have helped reduce prices and led to greater use of generic drugs. Walgreen's prescription sales growth comes on the heels of rival CVS Caremark Corp.'s (CVS) statement in August that it saw no recession in its prescription-drug business. Pharmacies are expected to benefit from a cold-weather return of the H1N1 virus in the U.S.

Walgreen also on Tuesday launched a program that will allow customers to get a 90-day supply of certain prescriptions at Walgreen drugstores. The program is aimed at shoppers who prefer to pick up their medicine at the drugstore rather than ordering it through the mail.

The pharmacy chain is expanding its role in the health-care business. Last month, Walgreen said it will supply prescription drugs directly to Caterpillar Inc. (CAT) workers and retirees starting next year. Walgreen also manages health and wellness centers at a growing number of corporate offices.

Walgreen said it opened 149 new drugstores during the quarter, compared with 162 in the third quarter and 199 in the same quarter a year ago. It said it expects its number of stores, excluding acquisitions, to increase 4.5% to 5% in the fiscal year just begun, and 2.5% to 3% thereafter.

-By Mike Barris, Dow Jones Newswires; 212-416-2330; mike.barris@dowjones.com

-Amy Merrick contributed to this article