Cesar Vargas seemed to have checked all the right boxes in his quest to become a lawyer in New York State. He made honors at both college and law school in New York City, his home since coming to the United States from Mexico at age 5. He interned with a State Supreme Court judge, a Brooklyn district attorney and a United States congressman. And he passed the state bar exam.

The only obstacle that remained before he could become a certified lawyer was an evaluation of his background and character by a committee appointed by the State Supreme Court.

That committee rated him “stellar.” In the same stroke, however, they also recommended against his certification as a lawyer. The reason: Mr. Vargas is an unauthorized immigrant. The question of whether he should be allowed to practice law, the committee said, was better suited to the courts or the Legislature to decide. The matter, which now rests with the State Supreme Court’s appellate division, has become a test case for whether immigrants in this country illegally can practice law in New York.

“I feel like I’m getting left behind,” Mr. Vargas, 30, said this week of his thwarted bid to become a lawyer. “After sacrificing so much, it’s left me with the sense that all that work was for nothing.”