A company that loaned $3.5 million to a business owned by a man convicted of trying to sell military parts to Iran illegally cannot sue the lawyers it says failed to warn it of the risk.

A federal judge on March 30 dismissed malpractice claims against lawyers from Day Pitney and other firms, finding the lender should have sued the lawyers as part of its state court suit against the borrowers and that, in any event, it was the borrowers’ fraud that caused the loss.