He came to regret it.

Mr. Kona, a Palestinian stonecutter, has been in the United States legally since 2002. His three daughters are in college. He had applied to become a United States citizen.

But when immigration lawyers discovered his robbery case, they warned him that the fact that he had pleaded guilty meant he could be deported.

“We don’t want to go back,” Mr. Kona said. “We don’t know a thing back there.”

Diversion’s big promise is to spare defendants a criminal record. But that central goal is being undermined by prosecutors across the country who, for the sake of expediency, are requiring defendants like Mr. Kona to plead guilty.

If a defendant fails to complete diversion and is sent back to court, prosecutors must mount a case from scratch, locating evidence and witnesses months or years after the fact.

“You didn’t just go to a sentencing hearing, you went to square zero,” said Joshua Marquis, an Oregon district attorney who serves on the board of the National District Attorneys Association. “So many D.A.s were like, ‘Why are we doing this?’”

Guilty pleas solve the problem, ensuring conviction without the effort of a trial.

But for defendants, the pleas make things more difficult, coming back to haunt them years after completing diversion. Pleas have been used as evidence to deny professional licenses, citizenship and employment. The 2008 diversion guidelines issued by the National Association of Pretrial Services Agencies said that defendants should not be required to plead guilty.

Other common practices make it harder for defendants to succeed. Though prosecutors can dismiss a case when diversion starts, clearing it from the docket with the option of reopening it later, many prefer to leave the case open. A pending charge, though, can stymie defendants’ efforts to find work and housing, or even win custody of their children.