Following campaigns by several lawmakers and complaints from celebrities, California Gov. Jerry Brown signed legislation Tuesday prohibiting paparazzi from using drones to surveil private property.

Through the new ban, "physical invasion of privacy" in the state has been redefined to include flying a drone over private land for the purpose of taking a picture or video, the Los Angeles Times reports.

It closes a loophole in paparazzi legislation passed last year by prohibiting the flying of drones in the "airspace above the land of another" in order to "peer into windows, capture goings on and otherwise spy on the private lives of public persons."

Miley Cyrus and Kanye West are among the celebrities who have complained about paparazzi drones hovering around their homes.

Drone Pap wtf A video posted by Miley Cyrus (@mileycyrus) on Jul 5, 2014 at 8:17pm PDT

The legislation was written by Assemblyman Ian Calderon who has pushed for tougher drone privacy restrictions since chairing a hearing on the topic in August 2014.

“At that hearing we learned that the paparazzi have used drones for years to invade the privacy and capture pictures of public persons in their most private of activities –- despite existing law," the Democrat from Whittier said in a statement.

Thank you @JerryBrownGov for signing #AB856, my bill which prohibits the use of #drones over airspace of private property #CALeg #privacy — Asm. Ian Calderon (@IanAD57) October 6, 2015

This is the first legislation restricting drone usage the governor has approved so far. Brown previously vetoed proposals that would have made flying a drone above private property for any reason a trespassing violation. Attempts to ban hobby drone operators from flying over wildfires, schools, prisons and jails were also shot down by the governor last week.