A federal appeals court has ruled that a pair of undocumented immigrants stopped for speeding in Pennsylvania should have had the chance to present a case that the evidence used to start deportation proceedings against them was gathered unconstitutionally.

The U.S. Court of Appeals for the Third Circuit upended the Bureau of Immigration Appeals’ affirmance of an immigration judge’s denial of a request for an evidentiary hearing filed by Guatemalan nationals Erick Geovany Yoc-Us and Luis Calel-Espantzay.

According to Third Circuit Judge Marjorie Rendell’s Wednesday precedential opinion, Pennsylvania State Trooper Luke C. Macke pulled over the van in which the two were traveling as passengers. Macke cited speeding as the reason for the stop, but then began interrogating the passengers as to their immigration status. When they were unable to produce identification, Macke called Immigration and Customs Enforcement.

ICE took the men into custody and eventually transferred them to a county prison. Deportation proceedings were initiated, but Yoc-Us and Espantzay argued that the arrest violated their Fourth Amendment rights. The immigration judge ruled that they failed to make a case that an egregious violation occurred, and the BIA upheld that ruling.

However, the Third Circuit found there was evidence that a constitutional violation occurred, and that the two undocumented immigrants were wrongly denied a hearing to determine the constitutionality of the evidence against them.

“Although Macke was justified in initially stopping the van for speeding, the record supports petitioners’ allegations that their Fourth Amendment rights were violated when Macke unreasonably extended the stop to investigate their immigration status,” Rendell wrote.

The question then shifted to whether the petitioners’ allegations were strong enough to merit an evidentiary hearing.

“We do not agree with the IJ and the BIA that petitioners failed to allege a potentially egregious Fourth Amendment violation that would warrant an evidentiary hearing,” Rendell said. “First, as we determined above, Macke’s extension of the stop was unreasonable and in violation of the Fourth Amendment. Second, petitioners’ allegations, if true, may show an egregious Fourth Amendment violation that would warrant application of the exclusionary rule because, as noted above, we specifically stated in [Oliva-Ramos v. Attorney General] that ‘whether any seizures or arrests were based on race or perceived ethnicity’ was a consideration in determining whether an egregious Fourth Amendment violation had occurred.”

The Department of Justice did not respond to a request for comment on the decision.

The petitioners are represented by Joanna Cline of Pepper Hamilton in Philadelphia, who said “We’re pleased that the court has vacated the BIA’s orders.”