UPDATE: Ahmad Khan Rahami charged with attempted murder of 5 cops

LINDEN -- The man wanted in the weekend explosions in New York and New Jersey was taken into custody in Linden Monday morning after a shootout with police that left two officers injured.

Ahmad Khan Rahami, 28, of Elizabeth, has been the subject of a massive manhunt after being named as a suspect by the FBI early Monday.

Two Linden police officers were wounded in the shootout that ensued with Rahami's arrest, Elizabeth Mayor Chris Bollwage said. One officer was shot in the abdomen but his vest stopped the bullet. Another officer was hit in the face by flying glass during the shootout, which happened just before 11 a.m.

Rahami and one of the officers were taken to University Hospital in Newark, according to Stacie Newton, a hospital spokeswoman.

"We have just received word that Mr. Rahami was apprehended in Linden," Bollwage said. "Two police officers were shot, one in the vest and one in the hand. Mr. Rahami is being taken away in an ambulance as we speak."

Acting Union County Prosecutor Grace H. Park said Rahami was shot in the leg and was undergoing surgery.

Additional information about the officer's conditions was not immediately available.

During an afternoon press conference at the Elizabeth Fire Department, U.S. Sen. Robert Menendez (D-N.J.) called the bombings "an act of terrorism" regardless of the motivations.

"Anyone who takes a bomb and ultimately puts it in a public place, to me that's the essence of terrorism," Menendez said.

The FBI and New Jersey State Police released multiple images of Rahami early Monday and warned that he was armed and dangerous. As the manhunt unfolded, authorities searched his residence and a restaurant where he worked in Elizabeth.

As investigators continued to remove boxes and towed two vehicles from the scene, the shootout with Linden officers was reported and Rahami was arrested.

Linden Mayor Derek Armstead said officers received reports Monday of a man sleeping at the front of Merdie's Tavern. The officers "immediately realized it was the suspect," Armstead said.

Rahami immediately began firing at the officers, hitting one on the abdomen, he said.

"Thank God he had his vest on," Armstead said.

Another bullet went through the window of a police cruiser, and grazed another officer's head, he said.

More officers joined in a running gun battle along the street and brought Rahami down, police Capt. James Sarnicki said.

Video shows bombing suspect Ahmad Rahami in custody in Linden, New Jersey. pic.twitter.com/NrVJCPNAkC — Eyewitness News (@ABC7NY) September 19, 2016

Ahmad Khan Rahami Shot in Linden Posted by Mike Markowycz on Monday, September 19, 2016

While Rahami has not been linked to the explosion early Monday in Elizabeth, there was a massive manhunt in and around the city once it was learned he lived and worked in a building at 104 Elmora Avenue in the city of 125,000.

Earlier Monday, the FBI had sent out a security advisory, alerting the public to be on the lookout for Rahami, who was described as armed and dangerous.

Bollwage said the suspect was not on the radar of local law enforcement, but his family was because of a lawsuit regarding their restaurant, which has since closed. Locals had complained about noise at the restaurant, and the city ordered it to close by 10 p.m. each night.

The mayor said he did not know the suspect's family, but he spoke with the father over the code enforcement issues.

"That was my only conversation with the father," Bollwage said.

The mayor said the issue with the family had nothing to do with "religion or anything like that."

Tim Gallagher, the special agent in charge of the FBI's Newark division, said the FBI gathered evidence from all sorts of sources after the explosion. He would not say if the suspect has been on a watch list.

Nor would he discuss the suspect's past. Gallagher said the FBI is looking into whether he was connected to a local terror cell.

NJ Advance Media staff writers Tom Haydon and Brent Johnson and the Associated Press contributed to this report.