Banco San Juan Internacional (BSJI) said in a complaint in Manhattan federal court that the Fed's New York branch informed the bank earlier this year that its "master account" - which lets banks access the Fed's electronic payment systems - would be terminated due to concerns about its compliance with U.S. sanctions and anti-money laundering rules.

The bank asked the court to bar the New York Fed from terminating its master account, without which it said it "cannot effectively function as a depository institution."

A spokesperson for the New York Fed declined to comment.

BSJI said it improved its compliance program during a previous 22-month suspension of its master account between 2019 and 2020 in the wake of a federal money laundering and sanctions evasion investigation into its 2016 and 2017 credit agreements with state oil company Petroleos de Venezuela.

BSJI agreed in 2020 to pay $1 million to resolve the probe. Federal prosecutors dismissed a civil forfeiture complaint and returned $53 million in seized funds to the bank.

BSJI says the loan agreements were lawful.

Puerto Rico's banking industry has historically had close ties Venezuela, an OPEC member. The New York Fed in 2019 said it would stop approving master accounts for some Puerto Rican banks due to U.S. sanctions on Venezuela aimed at ousting socialist President Nicolas Maduro, Reuters reported at the time.

"Improper targeting of BSJI because it was founded by a Venezuelan national more than 12 years ago ... is, of course, patently unreasonable (and unlawful)," BSJI wrote in the complaint, citing the Reuters story.

The bank said its founder, Marcelino Bellosta, has lived in the United States and Europe for much of the last 25 years.

(Reporting by Luc Cohen in New York; editing by Grant McCool)

By Luc Cohen