Former president Carter's top antitrust official endorsed the Justice Department's settlement with American Telephone & Telegraph Co. yesterday, calling the agreement "a significant victory for the government."

In fact, Sanford M. Litvack told the House Judiciary subcommittee on monopolies and commercial law that the settlement reached by the Reagan administration "is more favorable to the government" than the proposed agreement Litvack was negotiating with AT&T just before he left office.

At the same time, Litvack refused to criticize the decision by his successor, William F. Baxter, to dismiss the government's 13-year-old antitrust suit seeking a breakup of International Business Machines Corp.

Although Litvack had to continue the lawsuit during his tenure as the assistant attorney general, he said "I cannot say" that ongoing reviews and discussions with IBM officials ultimately would have not changed his mind.

The plain fact, he added, "is that the Department of Justice is unlikely to win any case that drags on for an extended period of time."

However, he added, as the AT&T settlement demonstrates, the government can prosecute a large company successfully if a case is narrow and properly focussed.

The settlement requires AT&T to undergo one of the largest divestitures in U.S. corporate history, spinning off all local operations of the 22 Bell System local companies. In turn, the government's seven-year-old antitrust suit against AT&T would be dropped.

The settlement "achieved all the essential goals of the lawsuit," Litvack testified. It "will prohibit cross- subsidization from regulated monopoly service to long-distance services that now face substantial competition and it will eliminate the incentives to discriminate on the part of the Bell operating companies in providing local exchange service and in purchasing equipment and supplies."

Although Litvack would not reveal the terms of the settlement he had been discussing with AT&T, he said the current settlement was "broader" because the divestiture of all the local operating companies "was not part of the discussions we had."

According to informed industry sources, the settlement Litvack had been negotiating would have required AT&T to divest itself of at least one local company and some parts of Western Electric, its manufacturing subsidiary.

The settlement wasn't completed, however, because he and the Carter administration ran out of time, Litvack said.

Although there is some concern that the current agreement may lead to higher local rates, Litvack said that should not "detract from the efficacy or wisdom of the settlement of the lawsuit. A court case cannot be . . . a solution for every problem in an industry," he added, noting that the settlement did resolve the antitrust concerns of the Justice Department.