A police officer says the military patrol was traveling in the town of Mahmoudiya when a parked car bomb exploded near it on Thursday, killing two soldiers and two civilians.
He says eight other people were wounded in the attack. A doctor in a nearby hospital confirmed the casualty figures.
Both officials spoke on condition of anonymity as they were not authorized to release information.
Mahmoudiya is located about 20 miles (30 kilometers) south of Baghdad.
Violence across Iraq has dropped dramatically over the last three years but deadly attacks still happen nearly every day.