Prosecutors said Mr. Irizarry was the first to be accused of making a drug sale that Detective Franco, working as a plainclothes detective, claimed he had witnessed.

Mr. Irizarry was arrested in February 2017 after the detective said he saw him selling drugs inside the lobby of a building on Delancey Street, prosecutors said in a court document.

But video from a security camera inside the building showed that no such transaction took place. Additionally, video from a security camera outside the building showed Detective Franco never entered the building, leaving him unable to see anything in the lobby, the document said.

This pattern was repeated on two other occasions. Ms. Baker was arrested in June 2017 on Madison Street after Detective Franco said that he saw Ms. Baker selling drugs in a building’s vestibule, the document said.

Yet investigators found security video showing that Ms. Baker went into the building without stopping in the vestibule, and that Detective Franco was not close enough to her to actually see what she was doing, the document said.

In April 2018, Mr. Irving was arrested on Detective Franco’s word that he had seen him giving cocaine to a woman, Karen Miano, who subsequently sold the drug to an undercover officer, the document said.

“Once more, the video from this incident directly contradicted the defendant’s version of events,” according to the document. “There was no drug transaction between Mr. Irving and Ms. Miano. Instead, Ms. Miano simply held the door open for Mr. Irving as he entered the building and she exited on her way to meet the undercover officer.”