The ability of oil companies to tap black gold off the coast of California is up in the air, following a lengthy fight between the state and federal governments.

Most of the water near California is off-limits to drilling, thanks to a 1982 congressional ban on new federal offshore oil leases that was extended until 2012 by President Clinton. But energy companies hold 36 undeveloped leases near California that predate the ban — and in 1999, California sued the Department of Interior after it extended those leases without the state’s consent. California argued that, under the federal Coastal Zone Management Act, it has the right to ensure that federal activities are “consistent” with state coastal-protection plans.

California won its case in court, and this April, the deadline passed for federal appeal. Now California has the chance to deny the leases by demonstrating that expanding oil production is bad for the state’s famous beaches and wildlife.

Oil and gas companies have already sued the federal government, arguing that cancellation of the leases is a “taking” of their property, worth more than $1 billion. But on June 12, the U.S. Senate approved a major inventory of offshore oil and gas reserves as part of an effort to reduce dependence on foreign oil and gas. California officials say the inventory could be the first step toward overturning the 21-year-old offshore drilling ban.