BALTIMORE (AP) _ A judge dismissed a lawsuit that alleged the CIA used a bank to fund illegal arms shipments, saying the case could breach national security.

''The focus of the court's inquiry in a situation involving state secrets is ... whether the state secrets are so central to the case that the litigation would create the risk of disclosure of the secrets,'' U.S. District Judge William N. Nickerson ruled last week.

Robert J. Maxwell, a former senior international banking executive at First National Bank of Maryland, sued the bank in 1988, claiming abusive discharge and other violations.

In his lawsuit, he accused the Central Intelligence Agency of using its account at the bank to ship illegal arms. Maxwell said he and his family were threatened by the CIA before he resigned in 1985.

Lawrence S. Ottinger, Maxwell's lawyer, said Monday he will appeal the ruling.

''As far as I'm concerned, that judge is saying the CIA could go out and kill people, claim state secrets and walk away,'' Maxwell said.

Maxwell, 52, of Shrewsbury, Pa., said after filing the lawsuit he and his former lawyer were threatened by the CIA, FBI and the Justice Department. He said the three agencies violated his civil rights.

Paul Bridenhagen, a Justice Department attorney, said he could not comment on the case. Carol Dunsworth, a bank spokeswoman, also declined to comment.

In papers filed with the court, Maxwell alleged that Associated Traders Corp. was a front company for the CIA, and that the CIA paid for weapons through its First National account.

Maxwell said the bank made three transactions for arms shipments by Associated Traders between December 1983 and February 1985. One of those transactions required at least five banks to transfer money to First National, he said. At that point First National sent $5.3 million to a bank in Panama and then to Switzerland, Maxwell said.