A U.S. District judge yesterday cleared the way for his colleagues on the federal bench nationwide to receive a 12.9 percent pay increase instead of the 5.5 percent that President Carter would have allowed last October.

The decision by Judge John Lewis Smith could mean pay increases for close to 1,000 federal judges -- including Smith -- whose salaries have been unchanged since March 1977. The projected 5.5 percent increase was held in abeyance pending outcome of this suit.

A spokesman for the Administrative Office of the United States Courts, which brought the case for the judges, said a federal trial judge's salary would go up from $54,500 to 61,500 as a result of Smith's decision.

The court ruling, which can be appealed by the government, would also affect D.C. Superior Court judges, whose salaries are keyed to those of federal judges.

Smith, in an 11-page opinion, said yesterday that Congress had not intended to roll back the 12.9 percent increase given the federal judges just 12 days before Congress approved the president's 5.5 percent ceiling for "executive employes."

Smith wrote that the language of the resolution seemed to exclude the judiciary from the pay freeze.

The Administrative Office went to court for resolution of the pay question after trying unsuccessfully to persuade judges to agree to the 5.5 percent figures and sign away their right to a higher amount. Sources said in November that practically every judge refused to sign away the possibility of a larger increase.

Smith noted in his opinion that the director of the Administrative Office, which disburses money to maintain the court systems, was caught in the middle of the pay dispute. The judges contended that the reduction from 12.9 percent to 5.5 percent violated the Constitution, which specifies that a federal judge's salary cannot be cut while he is in office. But, if the Administrative Office approved an increase over 5.5 percent -- as set by the Congress -- he would be subject to federal prosecution.

Although he did not rule on the judges' constitutional argument, Smith commented in his opinion that application of the pay freeze resolution to federal judges "would entail grave constitutional conflicts."

The constitutional question has been brought to the U.S. Supreme Court by a separate group of federal judges.

At the outset of his opinion, Smith noted that federal law prohibits any judge from deciding a case in which he has a "financial interest."

Smith said, however, that if he declined to hear the case, because his salary is affected, then no court could hear the case because all federal judges' salaries are affected.

The result, Smith said, would be the deny the Administrative Office and the judges their constitutional right of access to the courts.