The shooting happened at 3:30 p.m. in front of the Vacaville Police Department at 660 Merchant Street.

"He actually came into the lobby of the police department acting very erratic and sweating profusely, asking to meet with officers," police Lt. Ian Schmutzler said.

Later, a records clerk saw a man in his 50s acting suspiciously in the parking lot from the second floor of the police department, Schmutzler said.

An officer confronted Moreno about 20 minutes later in the parking lot.

"The subject had a knife, began to advance on the officer," Schmutzler said. "There was a verbal exchange, threats made by the subject. The officer, in fear for his life, discharged his firearm, striking the subject."

Officers perfomed CPR on Moreno and he was transported to the hospital for treatment with at least one gunshot wound. He later died of his injuries.

The sergeant who fired the shots is a 20-year veteran of the department.

The department had had previous contact with the suspect, who lived in Vacaville, but never anything as serious.