A district judge ran afoul of a sanctions provision of federal procedural rules when she ordered an attorney on her own to pay a $25,000 attorney fee as a penalty for taking a meritless case to trial, a Manhattan federal appeals panel has ruled.

In an unsigned ruling issued late Thursday, a three-judge panel of the U.S. Court of Appeals for the Second Circuit said that Rule 11 of the Federal Rules of Civil Procedure provides that attorney fees can be awarded only upon the motion of a party.