NEW YORK – A Staten Island ferry with a history of accidents, including a fatal wreck in 2003, malfunctioned as it approached its terminal Saturday and smashed into a pier with a jolt that tossed passengers to the deck and hurt up to 37 people.

The accident happened around 9:20 a.m. as the Andrew J. Barberi arrived at the St. George Ferry Terminal on Staten Island, carrying 252 passengers and 18 crew.

The crash appeared to be the result of a mechanical failure, New York City Department of Transportation Commissioner Janette Sadik-Khan said.

The ferry’s throttle failed to engage as it prepared to dock, she said, meaning that the crew was unable to use the engines to apply reverse thrust and slow down. The 3,000-ton, 310-foot-long ferry was moving at about 5 knots, or 5.8 mph, when it hit.

Coast Guard officials said the ferry sustained serious damage to its ramps and gouges in the decks above the waterline.

Fire Department spokesman James Long said 37 passengers were treated. He said 35 were taken to hospitals, but none had life-threatening injuries. Of those, 34 were treated and released.

Two police officers providing ferry security were among the injured, officials said, but no crew members were hurt.