The Supreme Court on Tuesday upheld the conviction of a man caught trying to enter the United States illegally in a case that initially was seen as a test of whether a flawed indictment could violate a defendant’s rights.

But in an 8-1 opinion, the Court said that the indictment of Juan Resendiz-Ponce itself was sound. The indictment “did not deprive him of any significant protection that the constitutional guarantee of a grand jury was intended to confer,” Justice John Paul Stevens said.