The charges were announced late in the day by Acting Union County Prosecutor Grace Park.
In addition to the five charges of attempted murder of a law enforcement officer, Rahami was also charged with second-degree unlawful possession of a weapon and second-degree possession of a weapon for an unlawful purpose, Park said.
"At approximately 10:30 a.m. on Monday morning, a uniformed Linden police officer approached a man later identified as Rahami outside a bar on East Elizabeth Avenue, according to the investigation," said Park in a statement. "At that time, Rahami immediately produced a handgun and shot the officer in the torso, striking him in his protective vest."
She said more police came to the scene and "engaged Rahami in an exchange of gunfire that ended when Rahami was shot multiple times outside of an auto repair shop on East Elizabeth Avenue, several blocks west of where he was initially approached."
Authorities recovered a handgun at the scene, said the prosecutor. She said Rahami was taken to a local hospital for treatment and had surgery. "Neither the police officer who was struck by gunfire nor a second officer who was struck in the head by a fragment of a bullet suffered life-threatening injuries," Park said.
State Superior Court Judge Regina Caulfield set bail at $5.2 million, according to Park.
"This defendant was wanted for questioning in a federal investigation being led by the FBI regarding explosive devices found and detonated over the weekend in New Jersey and New York City. That investigation is continuing, and any media inquiries regarding it should be referred to the FBI’s Newark office at 973-792-3020," said Park in the statement.
Rahami faces up to 20 years in prison if convicted of a first-degree crimes and up to 10 years in prison if convicted of a second-degree charge, Park said.
Police found and arrested Rahami Monday morning after receiving a tip that there was a vagrant sleeping in the vestibule of a closed bar at 534 Linden Ave., according to Captan James Sarnicki of the Linden Police Department. When officers arrived, they asked Rahami to show his hands and Rahami began shooting, said the captain.
Rahami is 28-year-old US citizen of Afghan descent, according to the FBI. His last known address was in Elizabeth.
Elizabeth Councilman Carlos Torres said authorities believe Rahami played a role in the bomb that exploded in the Chelsea section of New York City, injuring 29 people, as well as one that exploded in Seaside Park early Saturday and the bombs found in a backpack near the Elizabeth train station late Sunday night. One of those bombs went off while it was being examined remotely by a robot.