(Reuters) - A U.S. appeals court on Friday limited the ability of police to seize cell phones from homes of people suspected of crimes, ruling the prevelance of mobile devices did not mean police could assume a suspect had one when requesting a search warrant.

The U.S. Court of Appeals for the District of Columbia’s Circuit threw out a D.C. man’s criminal conviction for unlawful possession of a firearm by a felon, saying in a 2-1 ruling that the police found the weapon only because they drafted an “overly broad” search warrant.

The ruling could complicate efforts by law enforcement in Washington and other U.S. cities to seek text messages on cellphones for use as evidence in criminal cases.

The warrant did not say police believed they would find a gun. Instead, it authorized officers to search for any cellphones and other electronic devices in the man’s residence.

The warrant was unconstitutional because police had no particular reason to think the man owned a cellphone or that it would contain incriminating messages, the court said.

“The assumption that most people own a cell phone would not automatically justify an open-ended warrant to search a home anytime officers seek a person’s phone,” Judge Sri Srinivasan said in a decision joined by Judge Nina Pillard.

The man at the center of the case, Ezra Griffith, was suspected by Washington police of acting as the getaway driver in a 2011 murder.

In 2013 a judge approved a warrant that allowed police to enter Griffith’s residence and seize cellphones. When police arrived at Griffith’s residence they seized a gun that had been thrown from a window.

Griffith had a prior criminal conviction and prosecutors charged him with unlawful possession of a firearm by a felon. A jury convicted him in 2013.

Griffith’s lawyers argued the gun should have been suppressed, saying the warrant under which it was found was defective because of its focus on cellphones.

Judge Janice Rogers Brown dissented in the decision, saying the gun should have been allowed into evidence because police acted in good faith and “scrupulously observ[ed] the letter of the law.”