NEW YORK -- Two New York City cops were sprayed with an accelerant and burned on Sunday night in the final moments of a manhunt for a 23-year-old who went on a violent spree earlier in the day, authorities say.
The suspect, Patrick James Dillon, had slashed a woman, burned one man and fatally stabbed another before being shot in both legs by police, authorities said.
He was arrested in the Astoria neighborhood of Queens, New York, following the manhunt -- which involved "hundreds" of police officers -- according to law enforcement sources.
Dillon began his crime spree, police say, at around 11:20 a.m. ET Sunday when he slashed a 39-year-old female in the neck and face. Sources tell CNN the woman was Dillon's neighbor.
About four hours later and a mile away, law enforcement sources say Dillon fatally stabbed the 55-year-old owner of a liquor store and sprayed a 61-year-old homeless man with gasoline before lighting him on fire.
All of the attacks appear to be random, sources said.
Dillon next broke into an apartment before fleeing back to the scene of the first crime, where he was discovered by the two NYPD officers.
The police officers, from the NYPD's new counterterrorism unit, spotted Dillon in the rear of the first location at around 5:40 p.m. He had with him a bottle of accelerant and what appeared to be a small green kitchen knife, according to police.
Police then opened fire on Dillon before arresting him.
Video from KFOR sister station, PIX 11, captured tense moments leading up to his capture.
The officers and the suspect were taken to an area hospital, according to the NYPD. They are in stable condition, and the suspect is in critical but stable condition, sources said.
The female slashing victim and the 61-year-old burn victim are in stable condition at city hospitals, the NYPD said.
In a news conference Sunday night, NYPD Assistant Chief Diana Pizzuti thanked "the hundreds of police officers who looked high and low" in what she called a "manhunt."
"This has been a very unusual day here in Astoria," Pizzuti said.
CNN is attempting to find out whether Dillon has retained an attorney.