Photo: Evan Sernoffsky / The Chronicle / / Photo: Evan Sernoffsky / The Chronicle / / Photo: Evan Sernoffsky / The Chronicle / / Photo: Evan Sernoffsky / The Chronicle / /

Three carjacking suspects were arrested after leading police on a chase through San Francisco early Wednesday that ended when the driver crashed into a light pole near AT&T Park, officials said.

The episode began around 3 a.m. when three suspects carjacked a 24-year-old man on Geary Boulevard between 24th and 25th avenues in the city’s Richmond District, said Officer Carlos Manfredi, a San Francisco Police Department spokesman.

The victim was smoking a cigarette outside of his car, when one of the susepcts, a 21-year-old man, walked up and showed the outline of a gun inside a backpack, police said.

The car’s owner ran across the street at which point the suspect and two other men, ages 25 and 27, got into the car and sped off.

Officers soon spotted the vehicle on city streets and tried to pull it over, but the driver took off, prompting a pursuit, police said.

The chase ended when the driver slammed into a light pole and parking meter on Second and King streets in front of AT&T Park.

Police officers found two of the suspects in the car, while a third person got out and ran but was soon taken into custody, Manfredi said.

All three suspects were taken to a hospital where they were being treated before being taken to jail. The three men were not immediately identified.

Evan Sernoffsky is a San Francisco Chronicle staff writer. Email: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky