DUBLIN (AP) — Elan Corp. PLC said Wednesday it returned to profit in the third quarter, helped by a one-off gain from the completion of a deal with Johnson & Johnson to develop drugs for Alzheimer's disease. Elan said its net profit for the third quarter ended Sept. 30 was $52.3 million, compared to a loss of $83.5 million loss in the same period a year ago. In the second quarter, the company lost $68.2 million. Third-quarter revenue was up 6.5 percent to $287 million. The Dublin-based company said sales of its key drug, the multiple sclerosis-fighting Tysabri, were up 16 percent from a year ago at $191.4 million. The company reported an exceptional gain of $107.7 million from its $1 billion agreement with Johnson & Johnson to set up a joint venture to develop drugs for Alzheimer's disease. Elan took a 49.9 percent stake in the joint venture, and Johnson & Johnson gained an 18.4 percent stake in Elan. Excluding exceptional gains, Elan reported a net loss of $1.7 million compared to a loss of $31.5 million in the third quarter last year. "Completion of the Johnson & Johnson transaction and the subsequent refinancing of our balance sheet provide strategic flexibility and financial stability for the company," said CEO Kelly Martin. "We are now afforded the opportunity to focus on growing Tysabri and EDT (Elan Drug Technologies) businesses, advancing our bioneurology pipeline and investing in unique science while having fundamentally reduced business risk across the enterprise." Elan shares were up 1.9 percent at $4.58 in midmorning trading.