Legislative compromise can look messy at times, so its worth pointing out when the process works as intended, such as a recent deal hammered out by the Transportation Committee in Augusta.

Last year, South Portland purchased a system that would mount cameras on police cars to take pictures of license plates, which could be run through a database turning up matches of stolen vehicles or ones registered to people wanted for crimes.

Checking license plate numbers against records is something police departments do already, and it is one of the reasons that vehicles have to display their plates, but the opportunity to misuse the technology raised concerns from privacy advocates, who said the cameras could record the movements of law-abiding people.

Sen. Dennis Damon, D-Trenton, submitted legislation that would have banned the use of the cameras entirely. Police officials balked, saying they had no intention of spying but needed the cameras to enforce the law more effectively.

The compromise makes sense for both sides. The cameras would be permitted only for law enforcement agencies, the Maine Department of Transportation and the Maine Turnpike Authority. The records would have to be purged every 21 days.

Since the South Portland Police Department always said it never intended to record the entire community’s movements, the compromise does not get in the way of good police work.

And because the law protects the public from the expansion of the technology beyond its stated purpose, the agreement should also appeal to the privacy advocates.

The bill still needs support from the House, Senate and governor before it becomes law, but the committee has clearly made a good outcome more likely by defining how this technology should be used.