NEW YORK (AP) — AmerisourceBergen's profit surged and revenue soared during the second, thanks largely to a supply deal the prescription drug distributor signed with Walgreen last year.

It also raised its profit expectations for the year.

The company in September began providing branded pharmaceuticals and some generic drugs to Walgreen, which previously got those drugs from one of AmerisourceBergen's rivals. Walgreen Co. is the largest U.S. drugstore chain, and its deal with AmerisourceBergen, is scheduled to last for 10 years.

Net income climbed to $180.1 million, or 76 cents per share, from $45.6 million, or 19 cents per share. Excluding one-time charges, the company earned $1.06 per share. Its revenue grew 39 percent, to $28.46 billion.

That was much better than the $1.01 per share in earnings and the $27.47 billion in revenue that analysts had predicted, according to a poll by FactSet.

The Valley Forge, Pa., company is now projecting net income of $3.64 to $3.74 per share, up from $3.60 to $3.73 per share.

Analysts expect $3.71 per share on average.

Shares of AmerisourceBergen Corp. picked up $1.71, or 2.6 percent, to $66.55 in midday trading.