Amazon's facial-recognition technology mistakenly labeled more than two dozen members of Congress as having been arrested for a crime, the American Civil Liberties Union said Thursday.

A test commissioned by the ACLU of Northern California found that the company's so-called Rekognition technology -- already in use by two U.S. law enforcement agencies -- misidentified lawmakers at an unacceptably high rate and disproportionately selected African-American in Congress as having past dealings with the law, according to the watchdog group. That raises questions about Rekognition's broader use as a tool for police and other government agencies, the organization said.

In its test, the ACLU compiled 25,000 public arrest shots, then used Amazon's software to check for matches using photos of all members of the U.S. House and Senate. The technology improperly tagged 28 lawmakers as having criminal records, with the false matches including males and females of both political parties from all parts of the country, the ACLU said.

Get Breaking News Delivered to Your Inbox

"Nearly 40 percent of Rekognition's false matches in our test were of people of color, even though they make up only 20 percent of Congress," the group stated.

The mistaken IDs included Georgia Rep. John Lewis, an icon of the civil rights movement, and five other members of the Congressional Black Caucus. In late May, the caucus wrote to Amazon saying they were "troubled by the profound negative unintended consequences this form of artificial intelligence could have for African-Americans, undocumented immigrants and protestors."

Amazon has reportedly also faced criticism from employees, who expressed particular concern about its use in the current political climate.

In an emailed statement, Amazon questioned the methodology used by the ACLU, saying the group had set its bar too low for determining a match. The software also can be useful in helping "find lost children, restrict human trafficking, or prevent crimes," a spokesperson for Amazon said by email.

The ACLU said it used Amazon's default setting in running the publicly available test at a cost of $12.33.

Such identifications, accurate or not, "could cost people their freedom or even their lives" and threatens to curtail Americans from "engaging in protest or practicing religion," the ACLU stated. "If law enforcement is using Amazon Rekognition, it's not hard to imagine a police officer getting a 'match' indicating that a person has a previous concealed-weapon arrest, biasing the officer before an encounter even begins."