Chief Justice John G. Roberts Jr. said Wednesday he had grave worries about “prosecutorial abuse” if even a minor lie in the application process means the government can later strip a naturalized immigrant of her citizenship.

As the issues of immigration and deportation take center stage under the Trump administration, Roberts and other Supreme Court justices seemed hesitant to give the government unfettered power to remove naturalized citizens from the country.

The case involved a Bosnian native, Divna Maslenjak, who was criminally prosecuted for lying on her application about her husband’s military service. She was deported by the Obama administration, which held the broad view that any misrepresentation — whether relevant or not — was enough to give the government the right to consider revocation.

“It is troublesome to give that extraordinary power, which, essentially, is unlimited power, at least in most cases, to the government,” Roberts said. Because it would be easy in almost all cases to find some falsehood, the chief justice said, “the government will have the opportunity to denaturalize anyone they want.”

Roberts, who regularly warns about the discretionary power of prosecutors, and Justice Anthony M. Kennedy added a moment of drama to a lively hearing that was the Supreme Court’s last scheduled oral argument of the term.

They were not persuaded by Justice Department lawyer Robert A. Parker’s assertion that other safeguards are built into the system and that government lawyers had little reason to search through the millions of files of naturalized citizens to find trivial reasons to prosecute. Even denaturalization, Parker said, only returns a person to the status of lawful permanent resident and allows reapplication.

Kennedy, who had been largely quiet, reacted strongly to that.

“It seems to me that your argument is demeaning the priceless value of citizenship,” Kennedy told Parker, adding, “You’re arguing for the government of the United States, talking about what citizenship is and ought to mean.”

Parker replied that the government agreed citizenship is a “priceless treasure.” He added, “One of the consequences of the priceless nature of citizenship is that Congress has surrounded it with a number of protections to ensure that the individuals seeking it square every corner and are absolutely and completely honest.”

Maslenjak, the Bosnian woman at the center of the case, was granted refu­gee status in 1999 along with her family. She is an ethnic Serb and said she and her family faced persecution. She became a U.S. citizen in 2007. During her immigration hearing, she said her husband evaded conscription into the army. In fact, he had served in a Bosnian unit implicated in war crimes.

Divna Maslenjak was criminally prosecuted, and she and her husband were deported to Serbia, while their children remain in Ohio.

The issue in the case is whether the government must prove that Maslenjak’s falsehoods were material to the granting of naturalization. Courts are split on whether that is necessary, or whether simply proving that a person lied is enough.

Christopher Landau, Maslenjak’s lawyer, said stripping an American of citizenship “is about the most grave thing” government can do, and it should at least have to show that the false information is relevant.

Some justices noted that the statute does not specifically require that. “It seems like, linguistically, we have to do some somersaults to get where you want to go,” said Justice Neil M. Gorsuch, who testified during his recent confirmation hearings about sticking closely to the text of statutes.

And Justice Ruth Bader Ginsburg said Maslenjak’s misrepresentations appeared directly relevant to her application. She lied about what her husband was doing in Bosnia, Ginsburg said. “Under what circumstances would that be immaterial?”

Landau said he did not deny that “this could be a very tough row to hoe” if Maslenjak is given another trial. But he said the government should have to prove her lies were relevant.

In his turn before the court, Parker, the Justice Department lawyer, said that because “naturalization is the highest privilege the United States can bestow upon on individual,” Congress has required that individuals “scrupulously comply with every rule governing the naturalization process.”

Roberts, who had asked no questions of Landau, lay in wait.

The chief justice noted that question 22 on the naturalization form asked “Have you ever committed, assisted in committing, or attempted to commit a crime or offense for which you were not arrested?”

Roberts then confessed: “Some time ago, outside the statute of limitations, I drove 60 miles an hour in a 55-mile-an-hour zone.” There was laughter in the courtroom and more confessions followed.

Justice Elena Kagan said she was “horrified” she might be in trouble for each time she’d lied about her weight. Justice Stephen G. Breyer, an Eagle Scout, said he may or may not have carried his Boy Scout knife into areas in which it was not allowed.

The point, Roberts said, is that if he was in an immigrant’s position and had answered “no” on question 22, “20 years after I was naturalized as a citizen, you can knock on my door and say, ‘Guess what, you’re not an American citizen after all.’ ”

The case is Maslenjak v. United States.