SAN LEANDRO -- The San Leandro Marina park path and par course were evacuated Friday afternoon when an off-duty police officer spotted a man with what appeared to be a gun, police said.

Police arrived about 1:35 p.m. at the Marina Bay Park Drive park and determined it was unsafe to approach the man, who appeared to be holding a weapon.

Police requested back up from a California Highway Patrol plane and an armored car from the Hayward Police Department.

With police surrounding him, the man took out a knife and started cutting his arms while walking toward police, saying he was going to kill himself, according to a police statement.

Police told him several times to drop the items in his hands, the statement said. When he refused, police subdued him by firing non-lethal projectiles at him using a compressed air gun. The man, whose name was not provided, was transported to a hospital for a psychiatric evaluation and treatment of cuts on his arms.

The gun turned out to be a replica, police said.

Reach Kristin J. Bender at kbender@bayareanewsgroup.com. Follow her at Twitter.com/kjbender.