Luis Bladilir Lopez would have needed a sharp defense lawyer to explain what could happen as the result of pleading guilty to a misdemeanor marijuana charge last year in Prince William County.

But Lopez, then 19, was never appointed a lawyer, according to court records. In the end, the consequences were far more serious than he probably could have imagined.

As soon as he entered a guilty plea, the federal government had strong grounds to deport him — and did so two months later.

Immigration lawyers and advocates say Lopez’s fate has become commonplace. In Virginia, and across the country, illegal immigrants who are convicted of minor, non-violent crimes often find themselves lumped in with violent offenders and deported under highly complex federal immigration procedures even as the Obama administration works to improve immigration enforcement procedures and focus on more serious offenders.

In 2010, many commonwealth’s attorneys across Virginia began automatically waiving jail time for mostly minor, misdemeanor offenses to save money. When prosecutors automatically waive jail time, judges no longer have to provide defendants with lawyers, potentially saving the state millions of dollars.

So it was with Lopez, who entered the country illegally in 2005, according to Immigration and Customs Enforcement. Neither he nor his family could be reached for further comment.

Prince William Commonwealth’s Attorney Paul B. Ebert (D) had automatically waived all jail time for misdemeanor marijuana possession and a host of other charges. That made it possible for the General District Court judge in Lopez’s case to negotiate a guilty plea without appointing a lawyer: All Lopez had to do was pay a $186 fine and forfeit his driver’s license for six months.

The Catch-22: Under federal law, illegal immigrants convicted of drug offenses are more likely to be deported, which is something defense lawyers are now required to explain. But Lopez didn’t have a lawyer, according to court records.

Advocates contend that prosecutors and judges in Virginia are essentially setting deportation traps for illegal immigrants charged with minor crimes by offering plea deals after waiving jail time and declining to appoint defense counsel.

“Where do they get off trying to get an uncounseled criminal defendant to plead guilty before they get a lawyer?” asked Victor M. Glasberg, an Alexandria civil rights lawyer who raised the issue with the Virginia Supreme Court. “It’s knowingly aimed at the Latino community, and it is part of Prince William’s ethnic cleansing program. [Judges] know the law.”

Prosecutors and judges flatly deny the accusation, saying that jail time for many nonviolent offenders makes no sense, that their budget pressures are real — and that they are not responsible for whatever federal immigration problems defendants may have.

Underlying the debate is Padilla v. Kentucky , a 2010 U.S. Supreme Court case in which the justices ruled that criminal defense lawyers must advise clients who are not U.S. citizens that they could be deported because of a guilty plea.

Some advocates say those standards should apply to judges or prosecutors when no lawyers are present.

Prosecutors say the Virginia Association of Commonwealth’s Attorneys was paying attention only to budget concerns when it proposed legislation in 2010 waiving jail time for certain misdemeanor crimes. The bill faced opposition and died in the General Assembly, said Mike Doucette, the commonwealth’s attorney in Lynchburg, who leads the association.

But legislators still wanted prosecutors to try to save the state money, saying that prosecutors’ compensation would not be cut as significantly if they could find dollars. In response, many individual commonwealth’s attorneys told General District courts that they would automatically waive jail time on their own for certain crimes, obviating the need to appoint counsel in many cases, Doucette said.

He and others, including Ebert, have reserved the right to pursue jail time in certain cases even as they waive it most of the time.

Meanwhile, courts have not said state judges are required to appoint counsel for indigent defendants facing potential federal immigration charges. “It may be desirable, but there’s a lot that’s desirable in these tough economic times we’re not able to do,” Doucette said.

Ebert said that he was unaware that unrepresented defendants pleading guilty to misdemeanors without facing jail time could be deported or face other immigration-related consequences. When defendants who are represented by counsel look to work out a deal on the grounds that the immigration-related consequences are more severe than the crime, Ebert said he listens and sometimes tries to work out a deal.

Generally, though, he said that’s not his job. “As a matter of principle, the commonwealth attorney’s office can’t be concerned about what happens to an illegal immigrant,” he said. “You can’t really concern yourself about what the federal implications are.”

Prince William General District Court Chief Judge Peter W. Steketee did not respond to requests for comment.

William E. Jarvis, a Prince William General District Court judge who until October was a prosecutor in that county, said that there was no ill will on the part of Prince William’s judges or prosecutors toward immigrant defendants.

“We’re slow to change, period,” Jarvis said of the judicial system. “I can tell you with absolute certainty . . . there was no systematic plan on treating [immigrants] differently.”

He said some judges will now appoint state-funded defense lawyers when documents indicate that a defendant is subject to a “detainer,” or hold, from ICE.

However, it is not a policy of the court, he said.

Mark Voss, a criminal defense lawyer who represents many undocumented immigrants in Prince William, said some judges have begun to appoint lawyers in minor criminal cases in which defendants also have federal immigration issues. Judges, he said, should have been more aware of immigration consequences in the first place.

Prince William, one of the first in the country to crack down on illegal immigrants locally, participates in a partnership with federal immigration authorities, known as 287 (g), in which local jail officials can place a detainer and hold an undocumented immigrant on behalf of federal immigration authorities.

After Glasberg, the Alexandria civil rights lawyer, complained about the way Lopez and others who lacked counsel had been deported after agreeing to misdemeanor guilty pleas, the Virginia Supreme Court last month began requiring the use of new forms when defendants waive their right to a lawyer. The new forms warn defendants of the consequences of pleading guilty, including deportation and other federal immigration impacts.

But Glasberg said the new forms are required to be given only to those who waive their right to a lawyer — not those like Lopez, who, because they faced no jail time, were never provided counsel.

Eddie Macon, a Virginia Supreme Court administrative official, said individual judges have discretion about whether to provide the form or inform defendants when immigration consequences are on the line.

Nationwide, New York City has become a model for dealing fairly with criminal defendants’ immigration issues. There, the public defender's office has immigration lawyers who work in-house to deal with immigration issues.

But many other jurisdictions, immigration advocates say, have struggled to implement fairer procedures in the wake of Padilla.

“The punishment should fit the crime — it shouldn’t always result in banishment and separation from family,” said Laura Lichter, president of the American Immigration Lawyers Association. “It’s not about giving somebody preference in the actual process. It’s about making sure people understand what’s at stake. This part of the system has to be fair.”