The shots rang out over an almost two-hour window between 7.45pm and 9.30pm on Sunday night at Croydon Park, in Sydney's inner west.
Streets were closed and the area locked down after reports a man was indiscriminately firing at traffic, including police cars, travelling along Georges River Road.
Described as an "active shooting situation" by NSW police, tactical officers were called in to arrest a 60-year-old man from a unit above a business along the busy road.
He is yet to be charged and remains under police guard at Bankstown Hospital.
Body-worn cameras from police showed how close officers came to being hit as they took cover during the "serious and terrifying incident".
"You can hear numerous gunshots, and certainly impact, not too far from the camera," NSW Police Commissioner Mal Lanyon told Sydney radio 2GB on Monday.
One of the officers shot at had only been out of the academy five weeks, Mr Lanyon said.
Two rifles were seized from the unit after the man's arrest.
A taxi driver in his 50s remains in a serious but stable condition with wounds to his neck and head.
A motive for the shooting is yet to be determined but Mr Lanyon said there was no known link to any terrorism or gang activity.
Acting Superintendent Stephen Parry said the scene was secured "fairly quickly" and praised the officers involved at a press conference late Sunday.
"They exhibited extreme levels of bravery in doing what they did," he told reporters.
"They were under rapid fire gun shots on a number of occasions and should all be commended for their actions."
He was unable to confirm whether officers also fired their weapons during the stand-off.
Paramedics treated 16 people at the scene for minor injuries, some who were injured by shattered glass as windows were shot and others were treated for shock.
Two people were taken to hospital for further treatment.