WASHINGTON, Jan. 18 — The Senate on Thursday overwhelmingly passed sweeping changes to ethics and lobbying rules, overcoming bipartisan reluctance to ban many of the favors that lobbyists do for lawmakers and to illuminate the shadowy legislative practice of earmarking money for special projects.

The Senate’s action makes the start of the 110th Congress a watershed moment in the history of K Street and Capitol Hill. Interpreting the results of the Nov. 7 election as a reaction to corruption scandals when Congress was under Republican control, the Senate has joined the House in adopting broad new rules that go beyond the proposals Republicans introduced last year, the ones that Democrats campaigned on, or the extensive changes House Democrats recently passed.

The measure passed around 9 p.m. by a vote of 96 to 2. Senators Orrin Hatch of Utah and Tom Coburn of Oklahoma, both Republicans, were the only members to vote against the bill.

On Wednesday, Senate Republicans nearly derailed the bill in a dispute over when the Democrats would agree to vote on a Republican proposal, a version of the line-item veto. At a news conference Thursday, a half-dozen Democratic senators competed to belittle the Republicans’ line-item veto as “an excuse,” “a ploy,” “a subterfuge,” a “rabbit out of a hat” and “a grand act of ethics hypocrisy.”