HAWAIIAN Airlines says a can of pepper spray went off inside a plane headed from Oakland, California, to Maui, requiring emergency help for several people aboard.

Airline spokesman Alex Da Silva said 12 passengers and three flight attendants were treated for respiratory issues and released on Friday.

He said in a statement that a passenger illegally brought the pepper spray on the plane carrying 256 passengers and 10 crew members but that it appears the release was accidental.

Hawaii Department of Transportation spokesman Tim Sakahara said about 30 people complained of being affected by the irritant, but no one was taken to the hospital.

The airline said the flight was delayed earlier on Friday after a teenager in Oakland sent a photo depicting a fake crime scene to mobile phones of other passengers.