A rescuer jumped off a highway bridge in Ocean City on Sunday to save a child who had been thrown into the water by several crashes that involved five vehicles, local officials said. .

The child, 2-year-old girl, remains in stable condition after she was “ejected from a pickup truck with her car seat” and landed in the water, according to Ocean City police and fire officials.

Police officials said in a statement that “a heroic witness jumped from the bridge into the bay and rescued the child.”

The “good Samaritan” was “a couple of vehicles back,” saw what happened and jumped in, said James L. Jester, assistant chief of the Ocean City fire department. “It was just that quick.”

Jessica Waters, a spokeswoman for Ocean City, said the rescuer wished to remain anonymous.

After being brought ashore by boat, the girl was flown to a hospital in Baltimore, officials said.

Assawoman Bay is about 25 feet below the Route 90 bridge, he said. The bay is on the west side of the Atlantic Ocean resort town.

The crash happened about 2:45 p.m. and sent one vehicle partway over the bridge guardrail, according to a fire department account. Seven other people were taken to hospitals, and they were treated and released, officials said.

The cause is under investigation. Authorities said an initial investigation showed that several crashes may have occurred on the bridge.

On Facebook, Joe Oertel said he was on his boat with family, saw the accident and went to it. They realized a man was in the water and holding a young child, he wrote, and helped him get on board their boat. He said they took the man and the child to a nearby boat ramp where rescuers had arrived.

Oertal wrote: “Seconds counted in this rescue! Unbelievable that the Hero who jumped probably didn’t know that the bay is only 4’-5’ deep in that area.”

Jester said the good Samaritan “obviously” has “hero blood in him.”