A middle-school student in Kennebunk, Maine was burned Friday morning when her Apple iPhone caught fire in her pants' pocket as she sat down in a classroom at Middle School of the Kennebunks.

There was a pop and "immediately, smoke starts billowing from around the student," said principal Jeff Rodman. "She knew right away something was wrong and, in a panic, knew her pants were on fire caused by the cellphone."

The girl did a stop, drop and roll which dislodged the smoldering iPhone from her pants but did not put out the fire. Classmates helped her remove her pants then she was rushed to Southern Maine Medical Center in Biddeford where she was treated for second-degree burns. Reportedly she wanted to return to school but officials advised her to take the rest of the day off.

Rodman noted that the students' quick reactions likely prevented more serious injuries from occurring. "I commend the students, I commend our staff, and the Kennebunk first responders for their immediate response and for the way it was handled," said the principal. "It was just a strange thing. A great response by everybody involved."

The incident will be fully investigated by the state fire marshal. "People should obviously use caution when placing their phones in their back pockets so as not to crush them and cause an electrical short," said Emergency Medical Services Division Chief Andrew Palmeri.

Apple has yet to issue a statement about this incident. Apple products have made the news before for combusting. An iPhone 4 caught fire on an Australian flight in 2011 and in 2013 a California man's iPhone 4 caught fire while it was charging in his home. A demo iPad also burst into flames last November.

The lithium-ion batteries have the potential to combust when overheated or ruptured. Some also suspect the work of hackers.