HUNTINGTON BEACH, Calif.  The ocean flowed into historic wetlands Thursday for the first time in more than a century after bulldozers peeled back the last layer of an earthen dam.

Environmentalists who worked for 30 years to restore the massive Bolsa Chica area cheered and sipped champagne as the salty water poured into the fragile ecosystem that had been tapped as an oil field for decades.

The event capped a two-year project that cost more than $100 million and shunted a portion of the scenic Pacific Coast Highway onto an overpass.

Officials said it would take at least six hours for the ocean water to fill the 387-acre basin. The area had been separated from the ocean for 107 years.

The eight state and federal agencies involved in the project call it the largest and most ambitious restoration of coastal wetlands in the history of California, where 95 percent of saltwater marshes have been given over to development.

The Bolsa Chica wetlands project is at the cutting edge of a new and evolving science, said Shirley Dettloff, a member of the conservation group Amigos de Bolsa Chica and a former member of the California Coastal Commission.

"Not many wetlands have been restored in the world, especially in an oil field," said Dettloff, who's been fighting for the wetlands for 30 years. "Even we locals sometimes forget that this was the second-largest functioning oil field in the state of California for years, since the 1930s."

The degraded wetlands are already home to 200 species of birds, including six on state or federal lists of endangered and threatened species, said Marc Stirdivant, executive director of Bolsa Chica Land Trust.

Tidal flows and ebbs will fill and drain the basin twice a day, restoring a natural rhythm that should replenish the fragile ecosystem and could attract more species.

The area was connected to the ocean until 1899, when a duck-hunting club diked ponds to make it easier to catch their prey.

At one time, as many as 4,884 homes were proposed on 1,100 acres of the wetlands. The plan was scaled back to 3,300 homes by 1996.

A year later, the state paid $25 million for 880 acres, and that parcel was added to 300 acres that Signal Landmark had given to the state for wetlands preservation in 1973.

Now, homebuilding is confined to the upper mesa area of Bolsa Chica, with a 356-home development under way.

The restoration of the wetlands was partly funded by the ports of Los Angeles and Long Beach to make up for marine habitat that was destroyed during their expansion. The rest of the money came from voter-approved bonds.

The flooding of another 200-acre portion of the wetlands' original footprint is on hold for at least 30 days because an oil company, Aera Energy LLC, believes the work could create an oil spill. Another nearly 400 acres is still being leased from the state by oil companies.