An offshore oil rig in the Channel Islands off the California coast.

California Gov. Jerry Brown on Saturday signed legislation to thwart the Trump administration's efforts to expand offshore oil drilling along the California coast.

At the same time, the Democratic governor announced the state's opposition to the federal government's plan to expand oil drilling on public lands, an idea that's is controversial in conservation-minded California. It follows the U.S. Interior Department move in January that proposed to open up 90 percent of the country's offshore oil and gas reserves through new federal leases.

"Today, California's message to the Trump administration is simple: Not here, not now," Brown said in a press release. "We will not let the federal government pillage public lands and destroy our treasured coast."

The two bills signed by Brown on Saturday, Senate Bill 834 and Assembly Bill 1775, seek to prohibit new construction of oil drilling-related infrastructure, such as pipelines, within state waters if the federal government authorizes any new offshore oil leases.

The White House and Interior Department did not immediately return CNBC's request for comment.

California can make it difficult to expand oil and gas drilling, because it controls waters that are within three miles of its shoreline. The federal government has rights over waters between three and 231 miles offshore.

Moreover, the new legislation signed by the governor require new public notices and processes for lease renewals, as well as other hurdles to authorize new construction of oil and gas-related infrastructure associated with new federal leases. There has been no federal expansion of oil drilling along California's coastline for more than three decades, and public opinion polling in the state has shown Californians oppose more oil drilling off the coast.

Back in 2015, the state experienced its worst oil spill in 25 years when a ruptured oil pipeline spilled over 140,000 gallons of crude into the ocean, and coastal beaches near Refugio State Beach in Santa Barbara County.

On Friday, a jury in Santa Barbara County convicted Texas-based Plains All-American Pipeline of nine criminal charges related to the spill, including a felony for failing to properly maintain its pipeline infrastructure.

There are currently 43 active federal oil and gas leases off the California coast, but no new federal leases have been awarded there since 1984. The administration's plan seeks to expand oil drilling in the Pacific region, including in waters off California, Oregon and Washington.

The Trump administration offered Florida an exemption to offshore drilling. However, West Coast states received no such exemption.