* Posts Q4 loss, mainly on $575 mln legal reserve
* CEO does not yet see Amazon as a threat
* "Things are stabilizing," Baird analyst
* Shares initially rise, before reversing course (Adds details on forecast, CEO and analyst comments; updates shares)
By Anuron Kumar Mitra and Tamara Mathias
Nov 2 (Reuters) - AmerisourceBergen Corp said it expects stubbornly low generic drug prices, which have plagued drugmakers and wholesalers, to not deteriorate further next year, and brushed off concerns about Amazon's possible entry into the industry.
The drug distributor ended its fiscal year with a quarterly loss as it set aside $575 million for legal costs for a lawsuit that alleged its unit sold pre-filled syringes of cancer drugs prepared in ways that violated federal rules.
The now-defunct unit, Medical Initiatives, pleaded guilty to criminal charges in September and agreed to pay $260 million in penalties. Settlement talks on the civil lawsuit are still on.
The company's results come against a backdrop of slumping generic drug prices that have eaten into the profits of generic drugmakers such as Teva Pharmaceuticals Industries Ltd, and amid reports that Amazon.com Inc might enter the pharmaceutical supply chain.
AmerisourceBergen said it still expects generic drug prices to fall 7 percent to 9 percent in the current fiscal year that ends next September.
"It's still high, but it's not getting worse, which we think is a positive," Chief Executive Steven Collis told Reuters.
Collis said the drug distribution business was not just "a pick, pack and ship business" that could easily be upstaged.
"We haven't really counted Amazon at all yet as a threat."
AmerisourceBergen's shares rose as much as 3 percent following its fourth-quarter report, but reversed course to trade down 2.5 percent at $74.70 in midday trading.
Baird analyst Eric Coldwell said while investors still have a "lot of fear" due to the list of negative headlines on drug distributors, "I really feel like things are stabilizing."
"For the first time in a long time, the company's outlooks are similar to what the Street is modeling."
AmerisourceBergen said its forecast factored in Walgreens Boots Alliance's revised deal to buy a chunk of Rite Aid Corp's U.S. stores, rather than the whole company.
Analysts expect that after the deal, Rite Aid will switch to AmerisourceBergen as its primary wholesaler from McKesson Corp . AmerisourceBergen said it would likely see the full benefits only in the last quarter of this fiscal year.
The lawsuit reserve and other charges pushed the company to a fourth-quarter loss of $294.6 million, compared with a $145.7 million profit a year earlier.
Excluding these one-time costs, it earned $1.33 per share, edging analysts estimates by a cent, according to Thomson Reuters I/B/E/S. (Reporting by Anuron Kumar Mitra and Tamara Mathias; Editing by Anil D'Silva and Savio D'Souza)