Police have arrested Ahmad Rahami, wanted in connection with the bombings in Elizabeth, New Jersey and the Manhattan neighborhood of Chelsea, after a shoot-out in Linden, New Jersey. Two police officers were reported injured.

Two officers were reported injured by gunfire, after they responded to a call in Linden, a city just south of Elizabeth.

Rahami has been charged with five counts of attempted murder of a law enforcement officer and two gun charges, according to CBS. Federal charges are still pending.

BREAKING: Ahmad Rahami has been charged with five counts of attempted murder of a law enforcement officer. Mug shot: pic.twitter.com/pHuIvJPUki — Tom Winter (@Tom_Winter) September 19, 2016

The owner of a local bar spotted a man sleeping in his doorway and alerted the police, Linden Mayor Derek Armstead told NBC News. As officers approached the man, he opened fire and tried to escape.

#BREAKING Unconfirmed active shooter #Elizabeth NJ #ChelseaExplosion Photo is possibly related to #activeshooter https://t.co/XeJqHBESSY — (@BuffingActions) Sep 19 2016

Sources told NBC News the suspect was identified as Rahami, a 28-year-old Elizabeth, NJ resident suspected in a series of explosions in New Jersey and New York over the weekend.

Rahami was reported "alive but injured". His injuries were not life-threatening, law enforcement officials told local media, who showed images of Rahami being loaded into an ambulance.

Ahmad Khan Rahami alive but injured, loaded into ambulance in Linden https://t.co/aMCNYxwFnHpic.twitter.com/JJlFhPLYSu — Eyewitness News (@ABC7NY) September 19, 2016

"We are very fortunate the suspect was apprehended," the newly appointed New York police commissioner James O'Neill told reporters at a press conference Monday, adding that NYPD is very vigilant about terrorism because "we are the number one target in the world."

While the authorities were looking into possible accomplices, the FBI said there was "no indication" a terror cell was operating in New York.

Elizabeth Mayor Christian Bollwage confirmed Rahami's arrest and clarified that two officers were actually shot during the encounter, one in the chest and another in the hand.

Elizabeth mayor said Rahami was arrest Linden. Two officers wounded. @njdotcompic.twitter.com/26RqzRxylZ — Craig McCarthy (@createcraig) September 19, 2016

Officers also found a “suspicious package.” The bomb squad and explosive-sniffing dogs have been called in.

Linden NJ Active Shooter 500 East Elizabeth Ave 1 perp in custody and they just found a suspicious package req Bomb Sq & K-9 to the scene — (@SBANYPD) Sep 19 2016

Police identified the Afghanistan-born Rahami on Monday as a person of interest in the series of bombing incidents over the weekend in New Jersey and New York City.

Ahmed Khan Rahami, bombing suspect, shot in Linden, NJ pic.twitter.com/gK81o8zUrL — Corrina Drost (@Corrina_Drost) September 19, 2016

One improvised explosive device detonated just minutes before a US Marine Corps charity race on Saturday, in Seaside Park. Another bomb, also located in a trash bin, went off in the Manhattan neighborhood of Chelsea, injuring 29 people. An unexploded pressure-cooker bomb was found several blocks away. A fourth device detonated at the Elizabeth, New Jersey train station as police were trying to disarm it.

Rahami was identified as a person of interest based on the fingerprint on the unexploded pressure-cooker, Bloomberg reported. For the first time ever, the authorities sent out a mobile alert to the general public with the description of Rahami and his vehicle.

On Monday, Federal agents searched Rahami's apartment in Elizabeth, located above the First American Fried Chicken restaurant that is owned by his family. According to multiple reports, surveillance led the FBI to stop the car with Rahami's relatives on Sunday night, while on their way to New York's JFK airport. They were detained for questioning, but not arrested.

“No one in that car is under arrest,” the FBI clarified at a press conference on Monday afternoon. Speaking to the press, Special Agent William Sweeney would not disclose what sort of surveillance tools the Bureau used, but called them "fabulous."

After the description of Rahami's car was made public, one report placed it at West Point, some 50 miles north of New York City, prompting a brief lockdown of the US Military Academy. It turned out to be a false alarm.