UK barrister Alexandra Wilson next to her book "In Black and White" in a photo she posted to her Instagram.
CNN  — 

A UK lawyer who wrote a book about discrimination in the court system has said she was racially profiled four times in one day, including being mistaken for a defendant.

Alexandra Wilson, a mixed-race barrister who specializes in criminal and family cases, posted a Twitter thread Wednesday detailing the experience, which she said had left her “absolutely exhausted.”

In the first example, Wilson described how a security officer had assumed she must be a defendant rather than a barrister.

A fellow lawyer and a court clerk separately assumed that she was being represented in court, rather than appearing as a barrister.

She was also mistaken for a journalist, she said.

The first time, Wilson said, she “tried to shrug it off as an innocent mistake,” but the repeated assumptions later led her to tweet her thoughts on the situation.

“I don’t expect to have to constantly justify my existence at work,” tweeted Wilson, whose book “In Black and White” is billed as a “story of race and class in a broken justice system.”

Wilson did not specify where the alleged incidents took place.

Book cover for Alexandra Wilson's "In Black and White."

Kevin Sadler, acting CEO of Her Majesty’s Courts and Tribunals Service (HMCTS), which administers the UK court system, apologized to Wilson on Twitter on Thursday.

“I’m very sorry about your experience at court yesterday – it is totally unacceptable behaviour and I’m investigating the role of my staff and contractors as a matter of urgency,” tweeted Sadler.

“This is not the behaviour anyone should expect and certainly does not reflect our values,” he added, asking if she would send him further details.

CNN has reached out to Wilson and Sadler for further comment.

Wilson’s experiences were “appalling,” said Amanda Pinto QC, chair of the Bar Council, a national body representing UK barristers, in a statement.

“No one should be treated that way whether in their workplace, including when turning up at court to represent their client, or anywhere else. With regret, I fear Alexandra’s experience is not a one off,” said Pinto.

“Many barristers have to put up with the prejudiced assumptions of others – Alexandra has done so with exemplary grace and patience.”

Pinto said she would take up the matter with HMCTS, the senior judiciary and the Crown Prosecution Service.