Four men in a Dodge Magnum with Texas plates attempted to flee Ocean City Police early Saturday morning by driving on the boardwalk.

Police said the suspects were first spotted around 6:30 a.m. in the 10-block area near 3rd Street and the boardwalk. As police approached, the car turned onto the boardwalk and began heading north. Several pedestrians on the boardwalk had to move out of the way to avoid being struck.

Police said they followed the car, keeping a distance of several blocks, avoiding a pursuit on the boardwalk itself. The suspects turned off the boardwalk at Surf Avenue, slowing to allow the three passengers to exit near Baltimore Avenue, where they were detained by police.

The driver continued north on Baltimore Avenue and when police pulled behind the car, the suspect again drove onto the boardwalk, near 16th Street and exited at 17th Street. He then led police on a chase across Coastal Highway into a residential neighborhood, where he drove through a fence and a backyard before stopping short of driving into the bay. Police said the suspect then bailed out of the car and jumped into the water in an effort to escape.

He was taken into custody after swimming to a dock at 21st Street and Herring Way.

Police identified the driver as Jimmy Carl Anderson, 22, of New Park, Pa., and said he was in a stolen car that also contained suspected marijuana and prescription drugs.

Anderson was charged with motor vehicle theft, malicious destruction of property, disorderly conduct, resisting arrest, second degree escape, various possession charges and more than 30 traffic violations. He is being held without bond.