SAN DIEGO (CNS) - A man who was shot after a confrontation with San Diego police officers at Mission Bay Park last summer pleaded guilty Monday to a felony charge of unlawfully exhibiting a firearm to resist arrest.

Lance Tamayo, 46, will be sentenced to probation and 180 days in jail at a hearing June 22.

Under the terms of the plea bargain, Tamayo will have a four-year prison sentence suspended and also be required to do 200 hours of volunteer work, drug and alcohol programs, and continue with mental health treatment.

Tamayo called police from the 2800 block of North Mission Bay Drive shortly after 11 a.m. last Aug. 6 and told dispatchers that he was going to shoot himself, according to San Diego police Sgt. Manuel Del Toro.

Officers arrived to find Tamayo sitting in his car in a parking area near De Anza Cove. They called him on his cell phone and spoke with him for about 15 minutes before he agreed to surrender, Del Toro said.

Tamayo then got out of his car but returned and grabbed a loaded 9 mm pistol. He "pointed his gun recklessly at various people in the park," at a police helicopter overhead and at the nearby officers, prompting Officer Michael Weaver to shoot the suspect in the stomach, the sergeant said.