The Senate on Tuesday defeated a proposed ban on the lawmaker-directed spending items known as earmarks.

Under an agreement between the Democratic and Republican Senate leaders, a two-thirds majority was required to advance the ban proposed by Senator Tom Coburn, Republican of Oklahoma. Senators Claire McCaskill of Missouri and Mark Udall of Colorado, both Democrats, were also strong supporters of the ban.

The vote was 39 in favor and 56 against.

House and Senate Republicans have already voted among themselves to ban earmarks in the next Congress. With Republicans set to control a majority in the House and more than enough Senate seats to successfully filibuster any bill, it is unclear that any legislation including earmarks will be able to get through Congress even without a full, formal ban.

Eight Republicans voted against the earmark ban: Robert F. Bennett of Utah; Thad Cochran of Mississippi, the senior Republican on the Appropriations Committee; Susan Collins of Maine; James Inhofe of Oklahoma; Lisa Murkowski of Alaska; Richard G. Lugar of Indiana; Richard C. Shelby of Alabama; and George V. Voinovich of Ohio.

When Senate Republicans voted internally this month to ban earmarks, it was done by voice vote to avoid highlighting the dissension within their ranks. The Republican leader, Mitch McConnell of Kentucky, led the effort to adopt the ban after long defending the prerogative of lawmakers over spending. Mr. McConnell, a veteran member of the Appropriations Committee, said he was bowing to the wishes of voters for reduced spending as expressed in the midterm elections, and that a ban was a symbolic move. He also defended his support for earmarks over the years, saying they had benefited his home state.

Critics of earmarks say Congress can maintain and even expand its authority over federal spending without such undue focus on the relatively small number of items that lawmakers seek out on behalf of their home states and districts.