New York’s attorney general is barred from investigating national banks for possible violations of federal and state laws, a federal appeals court ruled Tuesday.

The 2nd U.S. Circuit Court of Appeals said that the interpretation of the National Bank Act by the Office of the Comptroller of the Currency was entitled to deference, and the attorney general’s office had no “visitorial powers” over national banks.