The plan, designed to reverse 25 years of erosion, will cost most homeowners $10,000 to $30,000 a year in additional taxes.
The drive to create the two erosion-control districts originated with homeowners, many of whom already were spending tens of thousands of dollars in a losing battle to restore their beaches.
More than 100 parcels are subject to the special tax in Bridgehampton and 56 in Sagaponack.
The final tally in Bridgehampton was 43 votes for and 25 votes against the plan. In Sagaponack, the vote was 32-24 in favor, said Southampton Town Clerk Sundy A. Schermeyer.
A simple majority in each area was needed to approve the commitment to raise taxes over the next 10 years to pay for pumping sand onto and in front of eroded beaches, a job expected to take three to four months.
The estimated cost is $13.4 million in Sagaponack and $13.1 million in Bridgehampton, officials said.
Properties outside the erosion districts will not be taxed, and the town will pay its share for any town-owned property inside the districts.
Bridgehampton homeowner Jeff Lignelli called the election an important first step in fighting shoreline erosion.
"We're very excited the plan has passed," he said. "We think this beach nourishment project is the first of many that are going to need to happen on the south shore of Long Island."
Beaches in the adjoining districts have lost an average of 125,000 cubic yards of sand a year for 20 years -- enough to fill 6,250 dump trucks annually, town officials have said.
Plans call for pumping more than a million cubic yards of sand from about a mile offshore onto beaches and just below the shoreline in each area.
Because the newly formed erosion districts are considered public facilities, the cost of replacing sand lost to a future storm could be reimbursed up to 87.5 percent by FEMA and the state.
With Mitchell Freedman