BROOKLYN — A seven-year veteran of the NYPD was shot in the foot Wednesday morning in Brooklyn while responding to a domestic violence call, according to police.

Authorities say the incident occurred near Gates and Franklin avenues in the Bedford-Stuyvesant section of Brooklyn.

The officer was rushed to Kings County Hospital. He was released Wednesday afternoon.

Police received a 911 call from a female around 8:30 a.m. saying a “male friend” of hers was damaging her apartment wall and refusing to leave, Chief of Detectives James Essig said during a news conference at Kings County Hospital hours after the incident.

At approximately 8:50 a.m., two separate police units from the 79th Precinct, each containing two officers, arrived at the scene at the same time and discovered the suspect and the female outside the apartment, Essig said.

Two officers entered the apartment building, conducted an investigation and, afterwards, attempted to place the male under arrest, at which point a struggle ensued, according to Essig.

The suspect, who police later identified as 41-year-old Raheen Joye, then fired a shot, striking NYPD Officer Orlando Adorno in the right foot, Essig said.

According to police, Joye then fled eastbound on Gates Ave. for one block, southbound on Bedford Avenue for one block, then eastbound on Monroe Street for one block — all with a gun in hand.

All four members of the NYPD pursued Joye, two in a police car and two by foot, Essig said.

Eventually, Joye was confronted by two officers in front of 184 Monroe Street, where police fired six shots in total, and Joye fired twice more, according to police.

Joye suffered two gunshot wounds to his thigh and was taken to Brooksdale Hospital, where he is expected to survive, police said.

Police said a 9 mm handgun was recovered on Joye’s person, and they are awaiting gun tracing results to determine whether or not the firearm had been stolen.

Police Commissioner Keechant Sewell, who attended the news conference along with Mayor Eric Adams, decried the violence, and noted that Wednesday’s shooting marked the 10th time an NYPD officer had been shot in the line of duty this year.

“The shootings of your NYPD officers go back to New Year’s Day this year, and here we are again as this year comes to a close,” Sewell said. “The strength and resilience of the NYPD will never waver, our members have sworn to help, to face danger, to assist the victims of crime and apprehend dangerous criminals across this city every day.”

Joye had 17 prior arrests in Georgia, dating between 1998 and 2014, most of which were for low-level drugs and driving while under the influence, according to Essig.

In 2005, Joye was arrested for discharging a firearm, and he was arrested again in 2007 for illegal possession of a firearm, police said. He also had an outstanding warrant for weapons possession in Troy, New York, according to police.