A Harvard-educated lawyer in Gov. Andrew Cuomo's administration was shot in the head by a stray bullet in Brooklyn early Monday during a spate of violence before the West Indian Day Parade, sources said.

First Deputy Counsel Carey Gabay, 43, who was appointed to the post in January, was with his brother and pals as they walked past an argument at Bedford Avenue and Sullivan Place in Crown Heights at about 3:40 a.m., police sources said.

When bullets started flying, Gabay ducked down between two cars to try to protect himself but was struck in the head, sources said.

Gabay — whose wife is pregnant with their first child — was rushed to Kings County Hospital, where he remains in critical condition, authorities said.

"It was just totally random. Some guy walked up and was spraying bullets everywhere."

Click for more from the New York Post