A Virginia man has been sentenced to nearly 12 years in prison on federal bank robbery charges in a case that tested the constitutionality of broad search warrants that use Google location history to identify people who were near the scene of a crime.

The Richmond Times-Dispatch reports that Okello Chatrie, 27, was sentenced Wednesday in the 2019 robbery of the Call Federal Credit Union in Midlothian.

Chatrie’s lawyers had argued the use of a "geofence warrant" to identify people who were near the scene of the robbery violated their constitutional protection against unreasonable searches. Federal prosecutors argued Chatrie had no reasonable expectation of privacy since he voluntarily opted in to Google’s Location History.

VIRGINIA SOLDIERS ASSAULT CASE AGAINST POLICE OFFICER CAN PROCEED TO TRIAL

U.S. District Judge Hannah Lauck ruled in March that the warrant violated the Constitution by gathering the location history of 19 cell phones — including Chatrie's — near the bank at the time of the robbery without having any evidence that their owners had anything to do with the crime. Geofence warrants seek location data on every person within a specific location over a certain period of time.

Roanoke, Richmond, Charlottesville news

A Virginia man was sentenced to nearly 12 years in prison on charges of federal bank robbery.

But Lauck denied Chatrie's motion to suppress the evidence produced by the warrant, finding the detective had acted in good faith by consulting with prosecutors before applying for the warrant and relied on his past experience in obtaining three similar warrants.

VIRGINIA 12-YEAR-OLD IS HELPING KIDS WITH CANCER AFTER LOSING HIS OWN MOM TO THE DISEASE

Privacy advocates said Lauck's ruling that the warrant violated the constitutional protection against unreasonable searches could make it more difficult for police to continue using a popular investigative technique that has helped lead them to suspects in a list of crimes around the country.

On Wednesday, Lauck denied a defense request for a lower sentence for Chatrie, saying there were "too many victims" in the robbery. Prosecutors have said Chatrie demanded cash in a handwritten note, waved a gun, threatened to kill a bank teller's family and ordered employees and a customer onto the floor.

VIDEO SHOWS VIRGINIA MALL CHAOS AS LIGHT SHATTERING MISTAKEN FOR SHOTS FIRED

The sentence Lauck imposed — 141 months — was at the low end of discretionary federal sentencing guidelines, which called for a term of between 141 and 155 months.