BOSTON, JAN. 3 -- For the first time in 20 years, a Republican became governor of Massachusetts today, as William Floyd Weld took the oath of office and promised a leaner state government with fewer rules and no new taxes.

Amid music, muskets and speech-making, Weld claimed one of the biggest prizes won by Republicans anywhere in the nation in last November's elections. He was joined by a new Republican state treasurer and 23 new Republican legislators.

In completing the transition, Democrat Michael S. Dukakis appeared at the central doors of the State House shortly after noon and, following custom among outgoing governors, made the long walk down the granite steps, accompanied by his wife, Kitty. Thousands of loyalists gathered to cheer Dukakis, who said two years ago that he would not seek a fourth term.

Minutes later, Weld, 45, was sworn in before a crowd that jammed the House Chamber.

The lanky, red-haired lawyer took office at the midpoint of the state's fiscal year and faces a deficit that may range as high as $1 billion on an annual basis in a budget of $13 billion. That has forced him to press immediately for a spending plan that can pass the state House and Senate, which remain firmly in Democratic hands.

Weld pledged to deliver by the end of the month his program to eliminate the deficit, but he provided no details today for legislators. Instead, he restated his philosophy of a minimal government that will "steer rather than row" the boat.

"Our government should be driven not by standard operating procedures and incrementally drawn budgets but by clearly defined goals . . . . Fewer rules and more results -- that's my definition of entrepreneurial government," Weld said in his inaugural address. "The result of such an approach will be a leaner, more flexible government and a healthier economy to support a generous social conscience."

Weld, who defeated Democrat John Silber in November by just 4 percentage points, enjoys a broad reservoir of goodwill. Politicians, activists and many citizens grew frustrated with the deep deficits that appeared soon after Dukakis lost the 1988 presidential race and with inability of state Democrats to solve the budget crisis.

According to many analysts, Weld owes his victory to liberals who deserted Silber and flocked to Weld because of his relatively progressive stands on gay rights, civil rights and the environment. In his 10-member Cabinet, Weld included three women, two blacks and a Democrat.

Accompanying Gov. Weld throughout his first day was his lieutenant governor, A. Paul Cellucci, a former state senator with close ties to President Bush. Among well-wishers at the inaugural were two top White House aides, Andrew Card and Ron Kaufman.

Weld can expect little help from Washington, however, in addressing the state's fiscal problems. Having promised during his campaign to "downsize" state government without hurting the needy, Weld must deliver reforms that eluded Dukakis.

Senate President William Bulger and House Speaker Charles Flaherty, experienced, liberal Democrats, said they are willing to work with Weld but made clear that he must make the difficult choices and present them for approval.

State Rep. Stephen Karol (D) said the Legislature will act swiftly because it must and noted that Wall Street has told Weld that the state cannot borrow more money to cover deficits. "Nobody benefits from further paralysis," Karol said, adding that a quick solution would make both branches look good.

Although his forebears arrived in Massachusetts in the 1620s, Weld was born in New York. He graduated with highest honors from Harvard University, where he delivered the Latin oration, then studied at Oxford before graduating from Harvard Law School.

In 1981, he was appointed U.S. attorney for Massachusetts and attacked organized crime and corrupt Democratic politicians. Then he served two years as head of the Justice Department Criminal Division until his noisy resignation in 1988 in an ethical confrontation with former attorney general Edwin Meese III.

The recent campaign was Weld's second run for public office. In 1978, he campaigned for state attorney general and lost in a landslide.