The BBC has announced Sean Bean will play a transgender character in an episode of its legal drama Accused.

Ben Stephenson, Controller of Drama Commissioning at the BBC, said the character would appear in the third episode of the second series, to be filmed later this year.

He told the Broadcasting Press Guild: “He’s playing a transsexual, a brilliant story, untold I think on mainstream television”.

Bean said: “I’ve wanted to work on a Jimmy McGovern drama for a while and I think this cracking script really delivers a powerful, emotional drama for the audience.”

Bean is set to play an English teacher known as Simon who has a female identity, Tracie, in the show, which features a different story in each episode.

Tracie’s search for love is reported to lead to a “terrible crime of passion”.

The series is directed by Ashley Pearce, who was also responsible for episodes of Downton Abbey’s second series.