It is an unwritten rule of drug running, but important nonetheless – if you're flying a small plane carrying a sizeable consignment of cannabis, don't stray into President Barack Obama's airspace.

Police found 18kg of the drug in a private Cessna that was forced to land in California after straying into the eight-mile exclusion zone for the presidential helicopter. Obama was travelling between engagements around Los Angeles.

A Secret Service spokesman said the president was never in any danger, and the pilot of the small plane had shown no obvious intent to harm him.

The incident took place on Thursday morning as Obama flew back to Los Angeles from a fundraising event in Corona Del Mar, near Newport Beach, in his official helicopter, Marine One. According to the LA Times, the four-seater Cessna failed to respond to repeated messages from air traffic controllers.

It was intercepted by two F-16 fighter jets, which forced it to land at Long Beach airport. Local police and federal agents detained the pilot, believed to have been flying solo, then found the cannabis.

Brian Leary, a Secret Service spokesman, said the aircraft was intercepted after breaking temporary flight restrictions imposed by the Federal Aviation Administration for the president's visit.