A Queens lawyer embroiled in a civil case against an investment firm forged a judge’s order in hopes of embarrassing the opposing side’s lawyer, prosecutors said yesterday in Brooklyn federal court.

Perry Reich, who once represented child-killer Joel Steinberg, faxed the fake document to Joel Davidson, who was representing investment firm Ryan Beck in a civil suit, Assistant U.S. Attorney Peter Katz said at the forgery trial’s opening.

In the suit, Reich accused Beck of losing his money.

The document was supposedly an order from Magistrate Judge Roanne Mann in which she recused herself from the case because of mistakes she had made.

Davidson believed the order was real and filed an appeal – only to turn red-faced when it turned out to be a fake.

Prosecutors said they have Reich’s phone log that shows he made a three-minute call to Davidson’s fax machine around the same time as the fax was received at Davidson’s office.

But defense attorney Richard Sgarlato said that Reich had merely mistakenly dialed the office fax rather than the phone number. He claimed that the forgery was placed on Davidson’s fax machine by someone at his firm to prank a junior lawyer.

“Mr. Reich has no reason to fabricate such an order,” he said, noting authorities have only a copy of the fax. “This order did not benefit my client. The order is a joke.”