Maryland attorney Michael Dobbs is expected to plead guilty in a courthouse where he practices to sexual solicitiation of a minor. (Dan Morse/TWP)

A longtime defense attorney in Maryland intends to plead guilty to sexual solicitation of a minor, according to new records filed in a police sting case that stunned the Montgomery County legal community.

Prosecutors will seek six months in jail for the lawyer, ­Michael D. Dobbs, 57, according to the records. Earlier this year, Dobbs allegedly sent lurid text messages to an individual he had met online and thought was a 15-year-old boy named Brandon, court files show. But Brandon was an identity created by an undercover detective, according to details disclosed at Dobbs’s arrest.

The plea agreement does not mandate jail time and lays the groundwork for Dobbs to possibly have the conviction stricken from his record.

“Mr. Dobbs is taking this case seriously, and is taking all necessary steps to address his legal and personal matters,” said David Fel­sen, an attorney who represents him in the case and signed the plea agreement with a prosecutor.

Michael D. Dobbs (Montgomery County Police/ )

Such plea agreements are not considered final until a judge accepts them, and Dobbs could still back out. He is scheduled to make the plea in Montgomery County Circuit Court on June 15.

Dobbs was arrested March 28, jailed briefly, and released on $100,000 bond. By mid-May, according to court records, Felsen and prosecutors were negotiating a plea deal. The terms were filed on May 24.

Dobbs has continued practicing law.

“Good morning, your honor,” he told Montgomery Circuit Judge Michael Mason last week, starting a 10-minute hearing on the probation status of a client convicted last year of drunk driving and eluding the police.

Dobbs grew up in Montgomery County, earned a law degree from the University of Maryland, and worked as a prosecutor for the Montgomery County State’s Attorney’s Office. His practice in Rockville handles a variety of cases, including criminal defense and workers’ compensation claims for military contractors who were injured overseas.

Dobbs’s reputation among local lawyers had long been that of a pleasant professional. “I’ve never heard anyone say a bad word about Mike,” Rockville defense lawyer David Martella said after his arrest.

Authorities say Michael D. Dobbs drove to this commercial parking lot in Rockville, expecting to meet a 15-year-old for a sexual encounter. The teen was a fiction created online by detectives, who portrayed the teen as a student at Richard Montgomery High School, seen in the background. (Dan Morse/The Washington Post)

Martella and other attorneys were stunned at the time. Not only did the accusations conflict with what they knew about Dobbs, they were illogical, given how defense lawyers generally know the tactics that detectives use.

“I hope there is an explanation,” Martella said at the time.

Martella said Friday that he had spoken to at least 20 other lawyers about the case and that all were upset over what Dobbs was going though or by the prospect the allegations are true. “No one has suggested any ill will toward Mike,” Martella said.

Speaking in general terms, he said that when these types of allegations come out of the blue, “in my experience, in cases like this, the accused usually is dealing with some kind of difficult, un­related situation in their lives.”

The police case against Dobbs was first detailed in a four-page court affidavit filed in March. The law enforcement sting had begun the month before, when a detective posted a message on a website stating: “young wm seeking older.”

He received an email from someone identifying himself as “Mark RockvilleGuy.” The detective, posing as “Brandon,” asked, “Are you cool with me being 15. Im almost 16,” according to the affidavit.

Mark RockvilleGuy kept emailing him, the detective said in the affidavit, and at one point wrote: “Im an attorney.”

Mark RockvilleGuy provided a cellphone number, sent a photograph of his face, and wrote increasingly detailed messages about sex acts, according to the affidavit.

“A meeting was set up,” detectives wrote in the court filing.

At 2:30 p.m. on March 28 — a Tuesday — the detectives staked out the parking lot at a commercial rock-climbing facility near Richard Montgomery High School in Rockville.

The location fit the tale detectives had spun, according to court records, because they had led Mark RockvilleGuy to believe Brandon was a student at Richard Montgomery. According to police, they had told him to pick up Brandon at the lot and go to Brandon’s house nearby.

Police said Dobbs drove into the parking lot in a Kia Optima, made a couple of trips around the lot and pulled into a spot at the end of a row. Three detectives quickly appeared and took Dobbs into custody.

The Montgomery County State’s Attorney’s Office asked colleagues in neighboring Howard County to handle the case, given the potential conflict of prosecuting a defense attorney whom Montgomery prosecutors had squared off against in previous cases.

According to the pending plea agreement, signed by Howard County Assistant State’s Attorney Jennifer Ritter and Felsen, Maryland sentencing guidelines call for a sentence as low as probation with no jail time and as high as two years in prison. The guidelines are not binding.

Ritter will seek a jail term of six months and ask to have Dobbs’s name added to an online, public sex-offender registry, according to the agreement. She also will ask that he undergo sex-offender treatment and be placed on five years of probation.

Felsen, the defense attorney, is free to ask for a lesser sentence. He received a commitment from Ritter that if Dobbs completes his probation, she would not oppose Felsen seeking “probation before judgment” for Dobbs, meaning that the conviction would be stricken from the record.