DUBLIN ( TheStreet) -- Irish drugmaker Elan is committed to close a transaction with Johnson & Johnson ( JNJ - Get Report) as quickly as possible following a judge's ruling it has breached an agreement with Biogen Idec ( BIIB - Get Report) for the marketing of multiple sclerosis drug Tysabri.

J&J reached an agreement in July to take an 18.4% ownership stake in Elan for $1 billion. The deal allows Elan to get financing from J&J to buy Biogen's Tysabri stake if Biogen was to be acquired.

Biogen, however, in late July claimed the Elan/J&J deal breached the Tysabri agreement. A federal judge agreed Thursday and the ruling means Elan must fix the J&J pact by the end of the month or it could risk losing all rights to Tysabri, a drug which is on track to generate about $1 billion in revenue this year.

" We respect the court's decision and the expedited attention in this matter," Elan said in a statement. "We are committed to working with Johnson & Johnson to close the transaction as quickly as possible, consistent with the Biogen-Elan Tysabri collaboration agreement."

-- Reported by Joseph Woelfel in New York .

Follow TheStreet.com on Twitter and become a fan on Facebook.