A bank has won a federal judge’s permission to pursue a claim that a Pennsylvania firm’s less-than-savvy understanding of New Jersey real estate law caused part of a $3 million loss from a bad loan.

U.S. District Judge Freda Wolfson in Trenton on Wednesday denied a motion to dismiss a malpractice suit charging that Riley, Riper, Hollin & Colagreco of Paoli, Pa., botched instructions by RBC Bank of Houston to make sure a construction loan in Egg Harbor Township was secured by a first lien.