Emergency personnel at the San Diego International Airport (SAN) were sent scrambling after a United Airlines flight bound for New Jersey was forced to turn around on Tuesday after its cabin caught fire.

According to CNN, the fire was caused by a battery of an electrical device aboard the plane bound for Newark. The flight crew aboard United Flight 2664 managed to stop the fire from spreading as the plane safely returned to San Diego.

Immediately after the aircraft landed, fire crews responded and evacuated all passengers and personnel onboard the United Airlines plane. Four people were sent to a hospital, UC San Diego Health. However, the San Diego Fire Department said two others declined further treatment.

READ NEXT: Eight Dead After Plane Crashes Into Colombia Neighborhood

Laptop Battery Blamed For Fire in United Airlines Plane

The Federal Aviation Administration (FAA) is now investigating the incident. However, it revealed that a laptop battery suddenly caught fire during mid-flight, and flight attendants immediately sprang into action to contain it before it spread.

WION reported that among the people hospitalized were the flight attendants who helped keep the passengers safe by containing the fire. United Airlines released a statement following the incident and praised the flight attendants who bravely fought the fire.

In the statement, United Airlines spokesperson Charles Hobart said: "Our crew acted quickly to contain the device, and medical personnel met the aircraft upon arrival at the gate." Hobart added that "several flight attendants were taken to the hospital as a precaution, and two customers were evaluated onsite."

He then praised their crewmembers for prioritizing the safety of all those onboard. As for those passengers stuck in San Diego because of the ordeal, United Airlines noted that they are now making arrangements to get their customers to their destinations.

United Airlines Passengers Talk About What Happened Aboard Flight 2664

Following their harrowing experience, several passengers aboard United Flight 2664 described what truly happened inside the plane. Passenger Caroline Lipinski, who was heading to the Newark Liberty International Airport in New Jersey, noted that shortly after takeoff, a bag belonging to a first-class passenger began smoking.

It forced the passenger, a man, to throw the bag on the cabin floor. It was later discovered that his laptop's external battery pack had caught fire.

"There was smoke in the cabin, I was terrified," said Lipinski. Another passenger, Stephan Jones, noted that flight attendants immediately grabbed fire extinguishers to put out the fire, the Associated Press reported.

However, Jones said he and other passengers were "gasping, screaming" while all this was happening. After the fire was contained, the flight crew placed the battery in a special fire bag to prevent it from spreading.

However, the Boeing 737 MAX 8 still had to return to San Diego as four passengers needed to be treated in a hospital for smoke inhalation.

FlightAware data shows that the aircraft took off from the airport at 7:07 a.m. Pacific Time and returned safely to San Diego at around 7:51 a.m. More than 160 passengers were reportedly evacuated using emergency slides.

READ MORE: Gold's Gym CEO Aboard Airplane That Crashed in Costa Ricaa

This article is owned by Latin Post.

Written by: Rick Martin

WATCH: Plane Makes Emergency Landing in San Diego After Battery Pack Catches Fire on United Airlines Flight - From CBS 8 San Diego