A gunman fired more than 100 rounds at downtown buildings in Austin and tried to set the Mexican consulate ablaze early on Friday before he died during a confrontation with police, authorities said.

Some of the targeted buildings are near the popular Sixth Street entertainment district, where bars close at 2am, about the same time the shootings began. Thousands of people are typically on the street at that time, Austin police chief Art Acevedo said.

“Many, many rounds were fired in downtown Austin,” Acevedo said. “With all the people on the streets, we’re very fortunate. I give thanks that no one but the suspect is injured or deceased.”

Investigators identified the shooter as 49-year-old Larry McQuilliams, of Austin. Police said he had a criminal record but didn’t release details, and said they were still trying to determine a motive.

Mexico’s foreign relations department issued a statement expressing “profound concern and condemnation” of the attack, but also said “there is no evidence the shots were exclusively directed at our facility”.

Other targeted buildings included Austin police headquarters and the US courthouse.

Acevedo said a sergeant, who was holding the reins of two police horses after a patrol, shot the gunman just outside the main entrance to police headquarters. But Acevedo said it was not clear if the shot was fatal or if McQuilliams took his own life.

His targets were located throughout downtown Austin and officers received multiple reports of gunfire, though the entire incident lasted about 10 minutes from the first call, Acevedo said.

Officers approached McQuilliams after he had been shot, but noticed cylinders in his vehicle, which was nearby. They also discovered he was wearing a vest they thought may have been rigged to explode. Officers retreated and a bomb squad was called, but it was later determined that the items were not explosive.

The shooter’s white van was still on the street outside police headquarters several hours after the shooting. Its doors, the trunk and hood were open as investigators looked it over.

The fire at the consulate was extinguished before any significant damage was done to the building. The federal courthouse’s guard house was shot several times, as was police headquarters, which Acevedo said was “extensively damaged”.

As a precaution, a police tactical team later went to the Austin apartment complex where they believed the gunman lived. Some homes close to his apartment were evacuated.

Adam Peyton, who lives in the area, said he awoke Friday to see Swat vehicles and police officers on motorcycles in the southwest Austin neighbourhood near the city’s well-known Zilker Park. He said the area was “really laid back” and close-knit, where residents know each other and are often out walking their dogs.