Omaha police say the shooting happened around 12:45 p.m. Saturday just north of midtown.
Police say the officer was in an unmarked vehicle when he saw a man he knew to be a gang member holding a gun. The officer radioed for backup and was putting on a tactical vest that identifies him as a police officer when the man came around the corner and fired a barrage of shots.
The police vehicle was hit by several rounds, but the officer was not. Another unoccupied parked vehicle was also hit. Police say the officer did not fire his weapon.
Police say the suspect was soon found and arrested.
The officer was treated for cuts from flying glass.