James had just appeared before a Harford County judge and won an expungement for his no-show client when a deputy who was in the courtroom asked to see his identification, according to his attorneys.

Rashad James, an attorney for Maryland Legal Aid, filed a complaint with the Harford County Sheriff’s Office on Tuesday requesting an investigation into the March 6 incident involving one of its deputies.

An African-American attorney has filed a complaint after he says he was racially profiled and detained by a sheriff’s deputy who thought he was a criminal suspect posing as his legal counsel in a Maryland courthouse.

CBS 13 Rashad James, an attorney for Maryland Legal Aid, has filed a complaint against the Harford County Sheriff's Office after he believes he was racially profiled.

James, according to The Washington Post, was not aware that there was a warrant out for his client’s arrest.

“The officer had been present in the courtroom during the hearing, yet addressed Mr. James as the client. Mr. James told the officer that he was the attorney, not the client,” Brown, Goldstein & Levy, the law firm representing James in his case, said in a statement.

James’ attorneys said he provided the deputy with his driver’s license. When that did not satisfy the deputy, he was asked to produce his state bar card or business cards, which James did not have and is not required to carry. The deputy then escorted James to an interview room where he questioned James and made phone calls over 10 minutes before finally allowing him to leave, the law firm said.

“If Mr. James were white, the officer would not have doubted that Mr. James was an attorney, would not have questioned his identity, and certainly would not have detained Mr. James after seeing his driver’s license,” said attorney Andrew D. Freeman of Brown, Goldstein & Levy. “There is no plausible explanation other than racial bias.”

Freeman’s office dubbed the situation “lawyering while black.” That expression has been used to identify incidents of racial prejudice in which white people and police target black people for doing everyday things, including “swimming while black,” “napping while black,” “driving while black,” “BBQing while black,” or in summary, “existing while black.”

A survey conducted by HuffPost last fall found that 54 percent of black Americans said they’ve felt that “others have been suspicious of them based on the color of their skin,” compared to just 6 percent of white people who said they have felt this way. Another recent study found significant black-versus-white disparities in how often drivers were stopped and searched by police.

“The facts of the situation speak for themselves,” James said at a press conference Tuesday, according to The Washington Post, when asked what made him think what happened was because of his race. “I’ve never heard of anyone being mistaken and assumed that they’re not an attorney until proven otherwise.”