SEATTLE – Nearly a decade before his rampage, Washington Navy Yard gunman Aaron Alexis was ordered to keep away from guns as a condition of his release for a malicious mischief arrest in Seattle, according to courtroom audio obtained Thursday by The Associated Press.

Alexis was taken into custody in 2004 after police say he shot out the tires of a vehicle parked near his grandmother’s home, where he was living at the time. Alexis was never charged, but the shooting provides a window into his runs-in with the law that happened long before the Navy IT contractor gunned down 12 people and then died in a shootout this week.

After his Seattle arrest, Alexis appeared in King County District Court, where a prosecutor asked that he be jailed on $25,000 bail pending a decision on whether charges should be filed.

Instead, Judge Mariane Spearman agreed with the defense, who asked that Alexis be released on two conditions: that he not have guns, and that he not have contact with the alleged victims — construction workers building a house next door.

“The concern here is how the malicious mischief was done — with a gun,” the deputy county prosecutor, Laura Petregal, told the court.