A federal bankruptcy court judge today ordered Mellon Bank to release more than $510,000 in Mesta Machine Co. payroll funds to employes of the bankrupt steel making equipment company.

Mesta said it would open its pay window Friday to give 350 salaried and hourly workers the 3 1/2 weeks pay they were owed when Mellon froze Mesta's accounts and the company filed for bankruptcy protection Feb. 9.

Leaders of a labor-clergy coalition said the order was a victory in their campaign against Mellon. The coalition had urged area residents to withdraw money from the bank to protest Mellon's freeze on the Mesta payroll account.

But the coalition said it would continue the boycott to focus attention on Mellon's overseas lending, which the protestors charge is reducing the bank's investments in the unemployment-ridden Monongahela Valley region around Pittsburgh.

State and local officials, however, said they would no longer consider joining the boycott by transferring government funds out of the bank.

Yet it remained unclear just why it took four months to unfreeze the back pay for Mesta's workers. Mellon, which supported the petition to free the funds in a hearing before federal bankruptcy court Judge Gerald K. Gibson, said it had always been willing to release the money, but had never been asked.

Mesta and United Steel Workers officials, however, said they had repeatedly asked the bank to release the funds, and had not been successful until the campaign to withdraw deposits from Mellon heated up a few days ago.

"We approached the bank on a number of occasions to free the money, and they just wouldn't hear of it," Mesta spokesman Paul Koechel said.

"We asked the first day they filed bankruptcy," said Pat McMahon, the president of USW Local 7174, which represents workers at Mesta. "This protest on Mellon Bank is what finally broke it."

During the hearing before Judge Gibson, McMahon stood up in the back of the courtroom and shouted, "Your Honor, if we'd known that this was all we had to do for our money, we'd have done it long ago."

The company's pay window will distribute checks totaling $445,000 to 250 hourly and 100 salaried workers beginning at 10 a.m. Friday. The remainder of the money retained by the court will be used to pay Mesta's federal and local unemployment compensation obligations.

The most a worker can get, under the order, is $2,000. McMahon said all unionized employes' paychecks would be below that cutoff. But the limit will apparently cut into the checks to be given to a few top Mesta executives.

In addition, the court approved another $22,000 to be paid in commissions to company salesmen who do not work on a salaried basis.

The payroll funds were frozen when Mellon and two other local banks called in $20 million in loans to Mesta Feb. 9. Although the bank at that time did not freeze the payroll account itself, Mesta had not yet transferred money to meet the next day's payroll into that account from the company's general account.

Mesta, which once was one of the largest suppliers of equipment to the steel industry and employed 1,200 USW members, is now operating with a skeleton staff of 30 as it proceeds through bankruptcy reorganization. The company has agreed to sell two major portions of its operations for $17 million as part of the reorganization, which will leave it as a small engineering and electronics company.

In another development today, representatives of the Denominational Mission Strategy, a group of 30 area ministers whose six-month-long attack on Mellon Bank coalesced in this week's protest, took a list of complaints against the bank to the U.S. Attorney's Office here. Among their charges are that Mellon is violating antitrust laws by acquiring other Pennsylvania banks and that Mellon is laundering money from organized crime. The bank denies the charges.

The ministers have been urging area residents to withdraw money from the bank for several months, but the effort gained momentum when they were joined last week by the USW and other unions in the protest over Mesta. Leaders of the protest estimate that $500,000 was withdrawn from the bank following a demonstration Monday, and they claim to have pledges for the eventual withdrawal of $40 million.

Bank officials will not say how much has been withdrawn as a result of the protest, but they say any damage done to the bank--which has assets of $25 billion--will affect its reputation more than its financial strength.

Mellon Senior Vice President Barry I. Deutsch, said in an interview today that the bank--whose "good neighbor" ad campaign has been ridiculed by the protestors--is considering a new campaign aimed at refuting the charges and bolstering Mellon's image.