Three male suspects have been arrested and charged in connection with an armed robbery in Brooklyn's Midwood section on Thursday morning, police said. 

The robbery began when the three suspects entered the Verizon Wireless-Wireless Direct store on Avenue P near East 2nd Street just after 11 a.m. and ordered all employees into the backroom, police said. They grabbed a bunch of cellphones and fled in a black Jeep, police said.

But an employee at the store gave chase, following the suspects’ car and calling 911. When he got to Coney Island Avenue and East 15 Street, the employee found a marked police car and flagged the officers down.

Armed with the description of the suspects’ car, a second NYPD patrol car caught up with the three suspects near the intersection of East 14th Street and Avenue O, police said. The Jeep then headed south, but police said it slammed into a parked car.

The suspects then jumped out of the Jeep, one of them holding a gun, police said.

An officer then fired his service weapon, hitting the gunman twice in the torso, police said. The wounded suspect was taken to Kings County Hospital and was listed in stable condition.

A second suspect was taken into custody and the third suspect escaped but was arrested hours later, police said.

Two firearms were recovered at the crash scene, police said. No officers were injured in the encounter.