Deputies went to an apartment in the 3700 block of Fruitvale Avenue at about 10 a.m. to serve an eviction notice to a resident, Sgt. J.D. Nelson said.
When deputies entered the apartment, they found a man lying in bed, holding a handgun, Nelson said.
The deputies backed out of the apartment and called in additional deputies and Oakland police for assistance, he said.
At some point, the deputies heard a single gunshot coming from inside the apartment, police said.
Oakland police officers entered the home and found the man unresponsive with what appeared to be a gunshot wound, Nelson said. He was pronounced dead at the scene.
The man, whose name has not been released, is believed to have been in his 60s, police said.
As of 12:30 p.m., police and deputies were still processing the scene.
Officers have recovered the gun, police said. The incident is under investigation.