U.S. District Judge Katherine Forrest in Manhattan entered a permanent injunction requiring RBS's ABN Amro unit to stop using the BankTrade software within a year, and not to use it to process new trade finance transactions received 60 days from now.

"ABN may not continue benefiting from its blatant and ongoing infringement simply because stopping that infringement will be disruptive to its business," Forrest wrote in a decision favoring Complex Systems Inc, which produces the software and had sought the injunction.

The ruling, which followed six years of copyright litigation, could cause major headaches for RBS's trade finance business, which generated $497 million (295 million pounds) of income last year, according to its annual report.

ABN, now called Royal Bank of Scotland NV, had in court characterized the BankTrade software as a "core" feature of its technical platform and said removing it would be like cutting out the system's heart.

An RBS spokeswoman did not immediately respond to a request for comment. Jeffrey Kaplan, a lawyer for Jersey City, New Jersey-based Complex Systems, had no immediate comment.

The litigation stemmed from ABN Amro's $21 billion sale in 2007 to Bank of America Corp of LaSalle Bank and an information technology unit that had been licensing BankTrade from Complex Systems.

Forrest said the license went to Bank of America, but RBS kept using the software, and a now-outdated version had become a deeply embedded component of a platform used in 22 countries by more than 2,600 clients, processing thousands of transactions a week.

The judge had ruled in March 2013 that ABN Amro was using BankTrade software improperly. In imposing an injunction, she said she was unable to calculate damages to Complex Systems, which has about $18 million to $20 million of annual revenue.

RBS is expected to appeal, according to the ruling. A hearing before Forrest is scheduled for June 5.

The case is Complex Systems Inc v. ABN Amro Bank NV, U.S. District Court, Southern District of New York, No. 08-07497.

(Reporting by Nate Raymond in New York; Editing by Tom Brown)

By Nate Raymond

Stocks treated in this article : Bank of America Corp, Royal Bank of Scotland Group plc