UPDATE 2-AmerisourceBergen profit beats on higher cancer drug sales

* Beats on cancer products sales

* Takes $575 mln hit from litigation

* Forecasts 7-9 pct revenue growth for 2018 (Adds details on earnings and forecast; updates shares)

Nov 2 (Reuters) - Drug distributor AmerisourceBergen Corp reported a slightly better-than-expected quarterly profit, helped by higher sales of cancer drugs, and forecast revenue to grow as much as 9 percent in 2018.

Shares of the company rose 4.4 percent to $80.00 in light premarket trading.

AmerisourceBergen's strong performance comes against a backdrop of a slump in generic drug prices, slowing price hikes for branded drugs and reports that Amazon.com might burst into the pharmaceutical supply chain.

"AmerisourceBergen executed well in a challenging healthcare environment," Chief Executive Steven Collis said in a statement.

The company forecast adjusted earnings of $5.90 to $6.15 per share for 2018, with revenue expected to grow between 7 percent and 9 percent.

The forecast factors in a revised deal between Walgreens Boots Alliance and Rite Aid Corp in which Walgreens agreed to buy about 42 percent of Rite Aid's U.S. stores instead of buying the whole company.

Analysts expect Rite Aid to change its primary wholesaler to AmerisourceBergen from McKesson Corp following the deal.

"With Street braced for bad, this actually looks pretty good," Baird analyst Eric Coldwell said, noting key inputs behind the company's forecast seemingly align with recent trends.

Revenue from core pharmaceutical distribution services business grew 3.9 percent to $37.7 billion in the fourth quarter ended Sept. 30.

Net loss was $294.6 million, or $1.35 per share, compared with a profit of $145.7 million, or 64 cents per share, a year earlier.

The company also incurred a charge of $592 million in the quarter, mainly due to litigation expenses.

In September, AmerisourceBergen paid penalties of $260 million on behalf of its now-defunct subsidiary Medical Initiatives Inc, which pleaded guilty to selling pre-filled syringes of cancer drugs prepared in ways that violated federal rules.

The company said its settlement discussions with the U.S. Attorney's Office for the Eastern District of New York and the Department of Justice are ongoing.

Revenue rose 4.2 percent to $39.12 billion.

Excluding items, it earned $1.33 per share.

Analysts on average were expecting earnings of $1.32 per share on revenue of $40.12 billion. (Reporting by Anuron Kumar Mitra and Tamara Mathias; Editing by Anil D'Silva)