AUBURN — A New York man accused of shooting an NYPD officer on Independence Day was arrested Wednesday on Center Street.

Michael Faison, 21, was captured in the McDonald’s parking lot by local police and members of the U.S. Marshal’s Service, the Central Maine Violent Crimes Task Force and the NYPD’s Regional Fugitive Task Force.

The fugitive was tracked to Lewiston, police said, and was captured when he went into Auburn for fast food.

According to reports out of New York, Faison is accused of shooting police officer Jamil Sarwar in the leg as the rookie cop and his partner responded to a Fourth of July shooting in Brooklyn.

Sarwar, 30, survived the shooting. Police said he and his partner were patrolling the Cypress Houses in East New York at 10:45 p.m. when members of a drug crew affiliated with the Bloods opened fire on a rival gang.

As Sarwar and officer Javier Solos ran to the scene, Faison allegedly shot at them.

The duo ran for cover, but quickly realized that Sarwar had been shot in the leg, according to the New York Daily News. He was rushed to a local hospital for treatment and released the next day.

Faison was held at the Androscoggin County Jail on Thursday and is expected to be extradited to New York.