A chartered jet carrying 143 people from the U.S. military base in Cuba tried to land in a thunderstorm and ended up in the river at Naval Air Station Jacksonville. Authorities said everyone on board emerged without critical injuries, lining up on the wings and waiting to be rescued.

The Boeing 737 arriving in north Florida from Naval Station Guantanamo Bay, Cuba, with 136 passengers and seven crew members came to a stop in shallow water in the St. Johns River. Everyone on board was alive and accounted for, the Jacksonville Sheriff’s Office said, with 21 adults transported to local hospitals in good condition.

Marine units from the sheriff’s department and Jacksonville Fire Rescue joined first responders from the naval air station, helping passengers and crew to safety.

Capt. Michael Connor, the commanding officer of NAS Jacksonville, said during a news conference that those on board were a mix of civilian and military personnel, and that while some were staying in the area, others planned to fly on to other parts of the country.

“I think it is a miracle,” Connor said. “We could be talking about a different story this evening.”

The base’s fire chief, Mark Bruce, said passengers were lined up on the plane’s wings when first-responders started rescuing them.

Several pets were on the plane as well, and their status wasn’t immediately clear. A navy statement early Saturday offering “hearts and prayers” to their owners said safety issues prevented rescuers from immediately retrieving the animals.

It wasn’t immediately clear what went wrong. Boeing said in a tweet Friday night that it was investigating: “We are aware of an incident in Jacksonville, Fla., and are gathering information.” The Federal Aviation Administration was referring media inquiries to NAS Jacksonville. The National Transportation Safety Board dispatched a team of 16 investigators to determine what happened.

Connor said he didn’t know what impact the weather had on the flight. “I was at home when this happened and there were thunderstorms and lightning,” he said.

A photo posted by deputies shows a Miami Air International logo on the plane. The company didn’t immediately respond to messages from The Associated Press.

It wasn’t known how long it would take to remove the plane from the river, but Connor said the landing gear appeared to be resting on the river bed, making it unlikely for the aircraft to float away. He said crews began working to contain any jet fuel leaks almost immediately after securing the passengers’ safety.

Liz Torres told the Florida Times-Union that she heard what sounded like a gunshot Friday night from her home in Orange Park, about 5 miles (8 kilometers) south of NAS Jacksonville. She then drove down to a Target parking lot where police and firefighters were staging to find out more.

“I’ve never seen anything like this,” she said.

The Jacksonville Fire and Rescue Department posted on Twitter that approximately 90 personnel responded to the scene, adding that the department’s special operations team had trained with marine units for a similar incident earlier Friday. Navy security and emergency response personnel also were on the scene, the Navy release said.

___

Schneider reported from Orlando. Other Associated Press contributors included David Fischer in Miami.