Detectives in central Queensland spent much of the night scouring parts of Mackay's CBD for evidence after a gunman opened fire.
Several streets were placed into lockdown when witnesses called police after seeing the armed man shoot into the air near a Gregory Street hotel on Wednesday afternoon.
He was carrying at least two long-arm rifles and fired shots "to draw attention to himself", Detective Inspector Brendan Smith told reporters.
Police negotiators were called in and by 8pm the man had surrendered peacefully.
"It's obviously a great result, nobody has been hurt," Det Insp Smith said.
Detectives were looking at "all options" regarding a motive as the man was taken to Mackay Base Hospital for a medical assessment.
The emergency declaration was removed shortly before 1.30am on Thursday.