Across this community on a hillside rising up from the beach, homes are blistering with signs urging a no vote on Measure O, as the drilling initiative is known: “Keep oil out of Hermosa.” All five members of the City Council, including the mayor, have urged voters to defeat it, despite the huge penalty — part of an agreement the city signed with the company to end a lawsuit — and the loss of future oil revenue.

“It’s a little more than we probably should have paid,” Mayor Peter Tucker said, referring to the deal for potential damages. “But if it gets us out of this constant, constant oil issue we’ve had hanging over us for 30 years, I think it’s money well spent.”

“We are not an oil town,” Mr. Tucker said. “We don’t need the money.”

E&B has begun an all-out campaign to persuade voters to approve the initiative, including the kind of television commercials that seem more suited to a governor’s race. (No local cable for this campaign: E&B says it has bought time on Fox News and CNN.)

The advertisements, with a backdrop of sun-dappled beaches and comforting music, dispute claims that the project would harm the environment and note that the method of drilling would mean no unsightly oil platforms on the horizon. The wells would drop straight into the ground before turning toward the oil under the ocean.