Actor Tom Felton is moving from the wizarding world of Harry Potter to the DC Comics universe after landing a role in superhero series The Flash.

The British star, who played villain Draco Malfoy in the Harry Potter films, will play crime scene investigator Julian Dorn on the hit US TV show, which airs on Sky One in the UK.

A tweet on the official Twitter page of The Flash confirmed Felton was joining the cast for the third series.

The show follows the DC Comics character Barry Allen – played by Grant Gustin – whose alter ego Flash is a costumed superhero crime-fighter with the power to move at superhuman speeds.

Tom, 28, originally from Surrey, appeared in all eight Harry Potter films along with Daniel Radcliffe, Emma Watson and Rupert Grint.

In an interview in April, he said he missed playing Draco and acknowledged he would probably always be associated with the villainous character.

Tom Felton
Tom Felton (Jordan Strauss/AP)

“I miss him greatly,” Tom told the Press Association. “I certainly enjoy the darker side of characters.

“Equally I just enjoy playing someone who isn’t like me.”