The officer and his partner stopped the big rig around 3:45 a.m. at 66th Avenue and Coliseum Way, Oakland police Officer Jeff Thomason said.
The driver of the big rig allegedly got out of the vehicle and fired shots at both officers, according to Thomason.
One of the officers was shot in the foot, and the other officer returned fire at the suspect, he said.
The suspect then got back into the big rig and was pursued by police until he crashed the big rig, Thomason said. The suspect then managed to escape again.
The officer who was shot was taken to an area hospital and has since been released.