Hit by the increased sale of lower-cost generic drugs, Rite Aid (RAD) posted a decline in first-quarter sales on Thursday but swung to a profit on the bottom line.

The retailer also reiterated its earlier-provided full-year sales and earnings outlook, with fiscal 2014 sales expected to be in the range of $24.9 billion to $25.3 billion, and EPS between a penny and 16 cents a share.

Analysts on average are calling for revenue of $25.23 billion and earnings of 16 cents a share.

The Camp Hill, Pa.-based drugstore operator reported net income of $89.7 million, or 9 cents a share, compared with a loss in the prior-year period of $28.1 million, or 3 cents.

The results, helped by increased sales of higher-margin generic drugs that are less expensive but more profitable, matched expectations by analysts in a recent Thomson Reuters poll.

While revenue for the three months ended June 1 slumped 2.7% to $6.3 billion from $6.5 billion in the year-earlier period, it narrowly beat the Street’s view of $6.27 billion. Same-store sales, a key growth metric for retailers measure sales at stores open longer than a year, fell 2.5%.

“We kicked off our new fiscal year by posting strong first-quarter results that reflect our continued operational and financial progress," Rite Aid CEO John Standley said in a statement.

Shares of Rite Aid, the third largest U.S. pharmacy behind CVS Caremark (CVS) and Walgreen (WAG), slipped about 1% in early trade to $3.08. They're up 130% year-to-date.

Follow Jennifer Booton on Twitter at @Jbooton