Sheriff's deputies raided a Maricopa County office Wednesday and seized control of a county computer system.
Deputies threatened to arrest any county employee if they tried to stop them.
County management immediately asked a Maricopa County Superior Court judge for a temporary restraining order against the sheriff's office.
That request was debated in Judge Joseph Heilman's courtroom for more than three hours on Thursday. Attorneys for the sheriff's office and the County Board of Supervisors debated legal technicalities over whether deputies had legal authority to change the data system's password.
Heilman repeatedly asked witnesses and sheriff's attorneys reasons why Wednesday's seizure was necessary. The data system's director, Gary Huish, replied: "None that I'm aware of."
The judge has scheduled a Friday hearing to settle the matter.
The seized system provides access to law-enforcement databases and has been the subject of a lawsuit between the sheriff's office and the Board of Supervisors.
In April, the sheriff's office filed a lawsuit demanding control of the system.
It claimed that sensitive data that should be the sole domain of law enforcement had become too available to the system's civilian administrators.