WATCH: The moment police realised 'homeless man' was bombing suspect

The moment police realised a man sleeping in the doorway of a bar was the armed bombing suspect they were hunting has been captured on body camera.

The video at fist seems to capture the seemingly standard conversation between New Jersey police and a homeless man seeking shelter on a rainy day.

The officers were responding to reports that a man was sleeping on the steps of Merdie's Tavern, unaware they were talking to Ahmad Rahimi.

Rahimi is alleged to have injured 31 people when he detonated two bombs in New York and New Jersey last month.

Moments after the conversation began Rahimi opened fire at Linden Police officer Peter Hammer and four other officers who had been called as backup.

No one was killed in the shoot-out which followed, but everyone was injured, including Rahimi.

The fugitive had given police the alias Ahman Khan and said he did not have any identification when pressed by officers.

The man accused of detonating two Manhattan bombs was found seeking shelter on the steps of a New Jersey bar.
The man accused of detonating two Manhattan bombs was found seeking shelter on the steps of a New Jersey bar.
Rahimi was hospitalised after he opened fire at five police officers in New Jersey.
Rahimi was hospitalised after he opened fire at five police officers in New Jersey.

“I’m homeless… I haven’t had a house for two weeks,” Rahimi said.

“I said I had lost my job and I couldn't pay my rent."

The footage ends as the police officer calls for “any other units” to provide back up and does not show vision of the shoot-out, which is expected to be used as evidence in the court case against Rahimi.

Rahimi was charged with five counts of attempted murder and a variety of weapons offences.

He was eventually hospitalised with gun shot wounds of his own.

Rahimi wass accused of detonating a pipe bomb along the route of a Marine Corps charity race in New Jersey and a pressure cooker bomb in New York.
Rahimi wass accused of detonating a pipe bomb along the route of a Marine Corps charity race in New Jersey and a pressure cooker bomb in New York.

Earlier this month he pleaded not guilty to the charges from his New Jersey hospital bed, however he has since been released on a $5.2 million bail.

The 28-year-old is accused of detonating a pipe bomb on the path of a New Jersey charity race as well as a pressure cooker bomb in New York.

A second pressure cooker bomb was also located, however, it was destroyed before it could be detonated.