The officer was patrolling the East Bay Municipal Utilities District watershed area several miles south of Moraga within Alameda County at about 6:30 p.m. when at least one person began firing at him.
The officer took cover and returned fire, but it was unclear if he hit his attackers, police Capt. Mark Ruppenthal said.
The officer was not hurt and was safely taken from the area in an armored rescue vehicle.
SWAT teams from the park district and the Alameda County Sheriff's Office returned to the area Tuesday to search for possible suspects, but didn't find any.
The watershed includes hundreds of acres of steep, heavily wooded terrain that is not open to the general public except by special permit. Another park district team returned to the area Wednesday to search a different location for evidence.
That team was able to find the spot where the shooter or shooters were and recovered shell casings from the gunfight, which have been sent to a crime lab for analysis, Ruppenthal said.
Officers conducting aerial surveillance of the area have also found at least one active marijuana crop near where the officer was shot at, but it was still unknown today whether the shooting was related to the marijuana grow.
As of today no suspects had been identified, but police are continuing to investigate the case, Ruppenthal said.
He said officers will also be working to remove the marijuana over the next several days.