Under the rule of the Nigerian dictator Sani Abacha more than 20 years ago, a handful of high-ranking government officials looted billions of dollars from the country’s coffers.

Now the Nigerian government is demanding some of its money back — from JPMorgan Chase.

In a British court, lawyers for the country are suing a subsidiary of the largest United States bank, charging that it enabled corrupt former officials to extract nearly $900 million between 2011 and 2013 from a government bank account in London.

JPMorgan says it was following instructions it received from senior Nigerian government officials. The country’s attorney general himself wrote a letter attesting to the legitimacy of the instructions. But the bank has been unable to persuade a British judge to throw out the case, in part because of the unusual circumstances surrounding the money transfers — including the fact that two banks to which JPMorgan wired the money rejected the transfers because of concerns that they might violate money-laundering laws.

At the heart of the case is whether JPMorgan did enough to safeguard Nigeria’s money. Under British law, banks are required to act in their customers’ best interests, even if someone connected to a customer tries to get them to do otherwise. Even as it tried to send money to various recipients, JPMorgan reported to regulators its concerns that it might be transferring funds to a convicted money launderer. It made the transfers anyway.