WASHINGTON, Nov. 8 — The Senate voted overwhelmingly today for a popular $23 billion water projects measure affecting locales across the country, thereby handing President Bush his first defeat in a veto showdown with Congress.

The vote was 79 to 14, far more than the two-thirds needed to override the veto that President Bush cast last Friday. Only 12 Republicans voted against the measure, and just two Democrats, Senators Russell D. Feingold of Wisconsin and Claire McCaskill of Missouri.

On Tuesday, the House voted by 361 to 54 in favor of the bill, also well over the two-thirds barrier to nullify the veto.

Enactment of the water projects measure had been widely expected, despite the veto, given the importance of the bill to individual districts and, of course, the lawmakers that represent them. The measure embraces huge endeavors like restoration of the Florida Everglades and relief to hurricane-stricken communities along the Gulf Coast and smaller ones like sewage-treatment plants, dams and beach protection that are important to smaller constituencies.

The veto of the water bill was the fifth cast by Mr. Bush, and the first to be overridden by Congress. The president and some Republicans had complained that the bill was wasteful. Some critics said that the measure did not do enough to reform the Army Corps of Engineers, which would handle much of the work; that there is already a huge backlog of water-related projects waiting for money; and that the current bill was larded with political pork.

But, as the comments of lawmakers made clear today, pork is in the eye of the beholder.

The bill “is one of the few areas where we actually do something constructive,” Senator Trent Lott of Mississippi, the Republican whip, told The Associated Press. He said the bill contains “good, deserved, justified projects.”

Senator David Vitter, Republican of Louisiana, also argued in favor of overriding the veto. “This bill is enormously important, and it has been a long time coming,” Mr. Vitter said.

Mr. Lott and Mr. Vitter side with President Bush far more often than they oppose him. But both senators represent areas that were hard-hit by Hurricane Katrina, and their votes to override Mr. Bush’s veto underscored the adage that politics is basically local, or at least regional.

Then, too, the bill was the first water-projects measure in several years, so there was plenty of pent-up demand for money in locales from coast to coast.

Senator Harry Reid of Nevada, the Democratic majority leader, said the veto override “sends an unmistakable message that Democrats both will continue to strengthen our environment and economy and will refuse to allow President Bush to block America’s real priorities for partisan reasons.”

“The Water Resources Development Act provides authority for essential new navigation projects and funds programs to combat flood and coastal-storm damage, restore ecosystems, and projects guided by the Army Corps of Engineers essential to protecting the people of the Gulf Coast region,” Mr. Reid said.

Senator Feingold said he was disappointed at the lost opportunity to fix “this flawed, bloated bill,” and dismayed that “many of our colleagues think the status quo is acceptable.”

“To me, there is nothing acceptable about a $58 billion backlog (soon to be $81 billion) of authorized but unfunded projects,” Mr. Feingold said. “Some of my colleagues have argued it is O.K. to authorize $23 billion in projects, because W.R.D.A. only authorizes projects and does not appropriate funds. This approach shirks our responsibility as elected officials.”

The Associated General Contractors of America lobbied hard for passage of the bill. “This week’s veto override means that this nation will finally have the opportunity for new investments in improved flood control, increasing navigation capacity and ecosystem restoration,” Stephen E. Sandherr, the organization’s chief executive, said after the Senate vote.