WHEATON, Ill. (CBS) — Bond was set at $5 million full cash bond Sunday for a man charged with firing at law enforcement agents who were surveilling a warehouse full of illegal marijuana in Wood Dale.

Nicholas Valentino, 33, of Des Plaines, appeared for a bond hearing at DuPage County Court in Wheaton Sunday morning, Judge James Orel set the bond, and ordered that Valentino will also have to prove that he is not using any money obtained illegally to make bond if he does so.

READ MORE: Chicago Weather: Snow Causing Dangerous Driving Conditions Monday Morning

The DuPage County State’s Attorney’s office said Valentino is charged with one count each of unlawful possession of cannabis with intent to deliver, unlawful possession of a controlled substance with intent to deliver, and two counts each of armed violence and aggravated discharge of a firearm, as well as aggravated unlawful use of a weapon.

This past Thursday evening, officers from the DuPage County Metropolitan Enforcement Group, or DuMeg, were conducting surveillance of a warehouse in Wood Dale they suspected of being used for drug activity. The agents saw a van and a Volkswagen leave the warehouse, the latter of which Valentino was driving, prosecutors said.

Agents followed the vehicles into the Chicago city limits, but did not pursue them further after that, prosecutors said.

But as the agents returned to DuPage County, they saw the van again and tried to pull it over – but its driver did not stop, prosecutors said. The agents kept following the van, and on a residential street in Wood Dale, the van flashed its headlights and cape to a rapid stop, prosecutors said.

Afterward, agents saw a man later identified as Valentino standing on the street pointing a gun at them, and he went on to fire two shots at the agents’ car, prosecutors said.

The agents reversed their car and were not shot, prosecutors said.

After firing at the agents, Valentino got back into the Volkswagen that the agents had been following earlier and sped off in it along with the van, prosecutors said.

READ MORE: Chicago Weather: Flight Cancellations, Delays At O'Hare, Midway Airports

Prosecutors said before Valentino shot at the agents, the Volkswagen had stopped to ambush them.

Agents began pursuing the two vehicles again – through residential areas of Wood Dale and later onto Route 83, where the vehicles split off and headed in separate directions, prosecutors said.

Soon afterward, the Volkswagen was involved in a crash with a Bensenville police squad car and an unmarked DuMeg squad car, prosecutors said. Valentino was arrested on the spot.

Agents found a full magazine for an AR-15 rifle and two cellphones on the center console of the Volkswagen, prosecutors said. At the scene of the shooting, two .223-caliber rifle shell casings and one live .223-caliber round were found – matching the rifle magazine found in the Volkswagen, prosecutors said.

The gun itself was found in Bensenville with no magazine and one round jammed into the chamber, prosecutors said.

On Friday, police executed a search warrant at the Wood Dale warehouse, where they found about 40 pallets of vacuum-sealed cannabis weighing about 7,688 pounds; about 406 pounds of cannabis edibles; 6,891 THC cartridges; and more than 700 grams of psilocybin mushroom bars., The marijuana at the warehouse had a street value of about $22 million, prosecutors said.

An AK-47, 9mm ammunition, and more than $107,000 were also found at the warehouse, prosecutors said.

“The allegations against Mr. Valentino are completely outrageous,” DuPage County State’s Attorney Robert Berlin said in a news release. “While recreational marijuana is legal in Illinois, the allegations that Mr. Valentino was in possession of such large quantities of marijuana underscores the fact that there is a thriving illegal black market that demands the attention of law enforcement. I cannot say enough about the efforts of the DuMeg agents involved in the apprehension of Mr. Valentino. With a watchful eye, they were able to pick up surveillance on a vehicle they had followed earlier that day and even after allegedly being shot at by the defendant, they continued pursuit which resulted in the apprehension of the defendant.”

MORE NEWS: Chicago Weather: Warming Centers Open Ahead Of Tuesday Temperature Drop

Valentino is due back in court on June 28 for an arraignment before DuPage County Judge Ann Celine O’Hallaren Walsh.

CBS 2 Chicago Staff