A 4-year-old child was allegedly ordered by his father to shoot at Utah police officers Monday as they were arresting him, injuring one outside a McDonald's. 

The Unified Police Department said a man went through a drive-thru at the fast food restaurant in Midvale, a suburb 12 miles south of Salt Lake City, around 1:30 p.m. and brandished a gun after his order was incorrect, FOX 13 Salt Lake City reported.

Restaurant employees told the man they would fix the order before he allegedly pulled out the weapon. They then called the police. 

When officers arrived, they tried talking to the driver. They pulled him out of the vehicle and said he was not uncooperative, the news outlet said. 

UTAH HUMAN RIGHTS ADVOCATE ARRESTED FOR ALLEGEDLY FAKING CANCER, RAISING MONEY FOR MEDICAL EXPENSES

As he was being arrested, an officer spotted a gun being fired from the back seat of the vehicle, UPD Sheriff Rosie Rivera told reporters. 

The 4-year-old fired the weapon while seated next to a 3-year-old sibling, authorities said. 

"This campaign against police officers just needs to stop," she said. We're here to protect and serve, and this is getting out of hand," said Rivera. "This is a child who thought it was okay to pull a firearm and shoot that firearm at police. I've never seen anything like this in my 28 years."

Investigators believe the suspect told the child to open fire on police. An officer deflected the gun as it was being fired but was injured in his arm, authorities said. 

CLICK HERE TO GET THE FOX NEWS APP  

"This is a sad day for law enforcement and our community," the department said in a statement. "To have an adult think it is okay to encourage a four-year-old to pull a firearm and shoot at police illustrates how out of hand the campaign against police has gotten."