WASHINGTON — The Supreme Court estimates that 94 percent of state prosecutions and 97 percent of federal prosecutions end in plea bargains. The accused getting his or her day in court is the rare exception.

This overwhelming reliance on plea bargains has led to a growing phenomenon: prisoners filing appeals from plea bargains.

On Tuesday, the Supreme Court heard arguments on whether an attorney who didn’t follow through on his client’s request to appeal a plea bargain acted incorrectly. The lawyer didn’t file the appeal because the plea bargain he had negotiated contained a waiver of the right to appeal.

The central question before the court was whether the attorney’s failure to file an appeal constituted “prejudice” and ineffective assistance of counsel. Since 2000, in Roe v. Flores-Ortega, the Supreme Court has presumed prejudice when an attorney failed to file an appeal if instructed to do so by a client.

Amir H. Ali, representing Gilberto Garza Jr. in Garza v. Idaho, said Garza’s trial attorney had usurped “a fundamental decision that rests with the client alone.”

“The attorney has no place telling that defendant that he would prefer to just substitute his own view that the defendant go off, cede defeat, and go to prison,” Ali said.

Some members of the court stressed two fundamental rights retained by those convicted of crimes.

The first was that attorneys must follow the client’s wishes. “If your client asks you, the lawyer, file a notice of appeal, you’ve got to do it. And if you don’t do it, it’s automatically prejudice,” Justice Stephen Breyer said, and repeated the idea later.

Breyer said the legal rationale of Roe v. Flores-Ortega applied in the Garza case, even though there was an appeal waiver.

The second right was that no appeal waiver is absolute. “An appeal waiver never gives up everything. It can’t,” Justice Brett Kavanaugh said, also repeating himself twice.

The Idaho Supreme Court ruled that “once a defendant has waived his right to appeal in a valid plea agreement, he no longer has a right to such an appeal.”

Garza’s lawyer stressed that he had not made the plea agreement, including the appeal waiver, voluntarily.

The questioning by the justices might suggest that they gave his argument more weight than the state’s argument that a deal is a deal.