A Harvard-educated lawyer who works for Gov. Andrew Cuomo was shot in the head Monday when he stumbled into the middle of a Brooklyn gang fight during West Indian American Day Parade festivities, authorities said.

Carey Gabay, 43, was strolling with his brother and friends through the parade’s pre-party, J’Ouvert, in Crown Heights when a dispute broke out between gang members at 3:40 a.m., police sources said.

As bullets started flying, the lawyer dove for cover between two parked cars but was struck in the top of the head, sources said.

Gabay was in critical condition on life support at Kings County Hospital, law enforcement source said.

The shooting was part of a spate of violence tied to the trouble-prone parade Monday. Among the other incidents:

An unidentified man, 24, was fatally stabbed in the torso and another man shot in the buttocks during a large fight on Empire Boulevard and Bedford Avenue at about 2 a.m., police said. The second man, 21, was listed in stable condition at New York Methodist Hospital, authorities said.

A 20-year-old man was grazed on the hand on Empire Boulevard and Bedford Avenue shortly after Gabay was shot nearby at Bedford and Sullivan Place, cops said. Officers busted a man at the scene and recovered a pistol.

A 39-year-old man was shot at about 4:20 a.m. on Martense Street and Nostrand Avenue. He was taken to Kings County and was expected to survive.

A 33-year-old man was stabbed in the abdomen at 3:13 p.m. during a dispute behind a parade float at Rochester Avenue and Eastern Parkway. He was taken to Kings County Hospital in stable condition.

Gabay — who lives in Fort Greene, about two miles from where he was shot — was appointed first deputy counsel for Empire State Development in January. ESD is Cuomo’s chief economic development agency.

Gabay, whose family is from the island nation of Jamaica, and his friends were among hundreds of people enjoying the party atmosphere before the parade.

“It was just totally random. Some guy walked up and was spraying bullets everywhere. I can’t believe it,” said Gabay’s younger brother, Aaron McNaughton, who was with him.

“He was a good guy. He just didn’t deserve this,” McNaughton said through sobs. “If you asked for the shirt off his back, he’d also give you the shoes off his feet.”

Gabay’s wife, Trenelle, said only, “We are going through a lot right now.”

Gabay’s sister, Chrystal Gabay, called him “the most kind person you’d ever meet.”

His family said through a spokesman that he had “gone through a very difficult surgery,” but “everyone is remaining positive and prayerful.”

A source close to the family said Gabay was not breathing on his own.

Cuomo, appearing at the parade after visiting Gabay’s family at the hospital, was shaken by the violence.

“I’m the governor of the state of New York, and there’s not a thing I can do,” he said.

“It’s personal for me because I know this young man. So beautiful, so giving, so kind. He was out last night to enjoy J’Ouvert with his family, and he got hit with a random bullet.

“It’s the same story almost weekly, tragedy after tragedy after tragedy. Anyone who doesn’t believe we have to do something about gun control is delusional.”

Mayor Bill de Blasio also attended the parade.

“We will fight against the propagation of guns with everything we have because we can’t keep losing good young men,” he said.

Police recovered 22 spent cartridges on the street and in a nearby parking lot along with a handgun.

Chief of Detectives Robert Boyce took to Twitter to ask for the public’s assistance in finding the shooters.

“Detectives need your help. If you have any info about the shooting of Carey Gabay call #800577TIPS,” he wrote.

Additional reporting by Michael Gartland, Natasha Velez, Kirstan Conley, Shawn Cohen and Khristina Narizhnaya