A funeral procession outside a Brooklyn mosque erupted into a wild street fight — with one person being smacked in the head with a fire extinguisher — when a FedEx truck struck a mourner Monday, authorities said.

Two FedEx employees got irked when they became stuck behind dozens of mourners and double-parked cars on Sixth Avenue and 63rd Street in Sunset Park at around 12:45 p.m., police and witnesses said.

As they tried to pass, the truck hit one of the funeral-goers, who had just come from a service at Beit El-Maqdis Islamic Center — sparking an all-out brawl.

“As the FedEx truck was coming by, he appeared to be impatient because [of] so many people,” said Naim Jawad, a board member of the Beit El-Maqdis Islamic Center, who witnessed the mayhem. “He kept moving and he hit one of the members that was crossing the street.”

Some of the mourners blocked the truck from driving away, prompting the FedEx workers to hop out and start throwing punches, he said.

“Words were exchanged and then physical contact, and they started swinging and punching each other,” Jawad said.

The FedEx workers then jumped back into the truck and re-emerged with sticks, a bat and a fire extinguisher — which one of the workers used to strike a mourner in the forehead, according to Jawad. The other worker sliced the man’s hand with a box cutter, he said.

Naim JawadDennis A. Clark

“[The congregant] was trying to make peace and separate them,” Jawad said. “They slammed him on the forehead with a fire extinguisher and they cut him with a box cutter on his right hand.”

Both workers were arrested, according to police. A mourner who is the nephew of the deceased person was also arrested for throwing a punch, according to Jawad.

A company spokesman said it is looking into the incident.

“We are aware of preliminary reports regarding this disturbing incident and are cooperating with investigating authorities to determine the facts,” FedEx spokesman David Westrick said.