Washington state adopted a Microsoft Corp.-backed law enshrining the most detailed regulations of facial recognition in the U.S., potentially serving as a model for other states as use of the technology grows.

Gov. Jay Inslee signed the law Tuesday allowing government agencies to use facial recognition, with restrictions designed to ensure it isn’t deployed for broad surveillance or tracking innocent people.

The...