Windows rolled down, music blaring, the car rolled toward the Mississippi River levee in downtown Baton Rouge, nearing a crowd of thousands gathered for the extravagant annual Independence Day fireworks show.

But about 40 minutes before explosions were set to begin lighting up the sky in front of the car, police lights lit up behind it, drawn by the loud music. The ensuing chase lasted 15 minutes and ended in Baker — but not before the fleeing suspect doled out punches to the head of a police dog and an officer, according to an affidavit of probable cause.

And when police finally had the chance to search Gad Ezekiel Black’s car, they found a 9-year-old boy “curled up in a fetal position on the front passenger seat, visibly shaken, scared and suffering,” the affidavit says.

Black, 30, was arrested immediately following the chase, a police spokeswoman said, although he wasn’t booked into East Baton Rouge Parish Prison until Sunday afternoon when he was released from a hospital.

Sgt. Mary Ann Godawa, the spokeswoman, said she couldn’t comment on why he was hospitalized.

She also said the child was physically unharmed. The affidavit indicates the child was Black’s son.

The pursuit, in which patrol cars received assistance from a helicopter, began in the 600 block of Florida Boulevard about 8:20 p.m. July 4. At the time, Godawa happened to be patrolling nearby on horseback along River Road for the Independence Day festivities.

“When he went past us, he wasn’t flying,” Godawa said, noting that the chase was not of the high-speed nature.

As Black fled, police wrote in the affidavit, he left the roadway on several occasions and drove six blocks against the flow of traffic. He was “dancing wildly” and, on several occasions, “hung outside the window and would flip his middle finger” at police officers, the affidavit says.

Black also “intentionally struck another vehicle” with four passengers near the intersection of Plank Road and Cannon Street shortly after swerving toward two marked police units.

After a 15-minute chase, Black ran over some spike strips, and his car came to a stop on Thomas Road in Baker near Plank Road.

Officers then told Black to surrender, but he didn’t respond, forcing Cpl. T.J. Morse to send his award-winning police dog, Tag, to apprehend the suspect. But when Tag grabbed hold of Black’s leg, Black began punching the dog’s head, the affidavit says.

Cpl. Kirt Allen intervened and, like Tag, suffered a punch to the face.

Neither Tag nor Allen were injured, Godawa said.

Black continued resisting arrest until officers were able to take him to the ground and handcuff him, authorities said.

Police booked Black, 11888 Old Hammond Highway, Apt. 91, into Parish Prison on Sunday afternoon on counts of excessive noise, aggravated flight, aggravated criminal damage to property, attempted injury of a police dog, aggravated assault with a vehicle on a police officer, cruelty to a juvenile, first-offense DWI, resisting an officer, resisting with violence and battery on a police officer.

He was released Monday after posting $43,500 bail, according to booking records.

Follow Ben Wallace on Twitter, @_BenWallace.