Robert Rinder, star of reality show Judge Rinder, will swap the courtroom for the ballroom as he joins Strictly Come Dancing.

The 38-year-old criminal barrister is a close friend of Benedict Cumberbatch, having served as his best man when he married Sophie Hunter last year.

The TV personality said in a statement: “The only thing I knew would make my grandmother more proud than watching my TV courtroom was to see me dressed up in white tie doing the foxtrot. So, although I suspect the latter will be far more difficult, I am doing Strictly Come Dancing for her.”

He added, that hd e’d a head start on the cha cha cha, having been taught to dance by his school nurse, Mrs Cornish. “I didn’t really suit childhood terribly well so I’d go and sit in her room,” he said.

“She taught me how to cha cha. So I can do that one.”

He dismissed the idea that he would be happy to get as far as the Blackpool Tower Ballroom, saying: “People want you to pretend a little as if you don’t want to get as far in the programme as possible… What nonsense.”

Rinder oversees disputes over consumer issues, business, neighbourhood rows and allegations of negligence in his ITV courtroom.

Sherlock star Cumberbatch also officiated when Rinder wed his partner Seth Cummings in a civil ceremony in Ibiza in 2013.

The two have a friendship dating back to their student years at the University of Manchester.

Talking to former Strictly contestant Scott Mills on Radio 1, Rinder said he had signed up for the show after being “mildly inspired” by Mills’s Under The Sea red lobster dance.

Discussing his fellow contestants, Rinder said he had initially thought pop star Anastacia was “the surviving princess of Russia”, while the name Melvin Odoom “sounds like something from Lord of the Rings”.

The final three Strictly celebrity contestants will be announced on The One Show on Monday evening – completing a line-up of 15 amateur dancers including former shadow chancellor Ed Balls, Pop Idol winner Will Young and model Daisy Lowe.