Police say it ended with the gunmen pretending to be the victims.
The suspects were armed, but only with BB guns and water pistols, when they entered the AutoZone in Bensonhurst around 10 p.m. Wednesday.
Police say a worker, one of seven inside, saw the suspects come in and tripped a silent alarm. The three suspects, two men and a woman, reportedly demanded cash. Police had the building surrounded by the time they tried to leave.
One of the suspects came outside in an AutoZone shirt, claiming to be an employee. But police asked the man the store's phone number, and he was arrested when he did not know the answer.
Police then went back inside and arrested the other two suspects, who were hiding in the store.
Charges against all three are pending.