Officers said relative of the suspect alerted police that a man armed with a gun was threatening to kill himself in the 2600 block of Senter Road around 6:50 p.m., San Jose police Officer Albert Morales said.
When police officers arrived, the suspect opened fire from inside his residence, police said. One of the officers was shot and pronounced dead at the scene, Morales said.
Police are still searching for the suspect but believe he remains inside the apartment. Evacuations are underway around his apartment.
At a news conference, police said the suspect is 57-year-old San Jose resident Scott Dunham. They say the suspect is married, but they believe he is alone inside his home.
The officer killed is a 12-year veteran of the force. Police have not yet released the officer's name.
Veteran San Jose Police Officer shot and killed responding to a call for service.— San Jose Police Dept (@SanJosePD) March 25, 2015
Police have not released further details.
An employee at a Vietnamese restaurant on Senter Road, a block away from the shooting, said police informed them that there was somebody in the area with a high-power rifle. The employee, who declined to give his name, said police instructed them to stay in place at the restaurant, where roughly 20 customers dining at the time.
Condolences from police departments throughout California began pouring in on Twitter late Tuesday.
"Our thoughts and prayers are with the families of San Jose PD at the traffic loss of a fellow peace officer," the Sonoma Sheriff's Department said in a tweet.
According to the San Jose Police Department website, the last time an officer was killed in the line of duty was Officer Jeffrey M. Fontana in 2001.
The Associated Press and Bay City News contributed to this story.