A classic DC Comics supervillain is coming to The Flash and he's sure to leave Barry and company bent out of shape.

TV Insider has learned exclusively that America's Got Talent alum and contortionist Troy James has been tapped to play Peter Merkel, aka Rag Doll, in the fifth episode of the upcoming Season 5.

The character was introduced in a 1942 issue of Flash Comics as the triple-jointed son of a carnival barker who fell into a life of crime after hiding himself inside a child's toy to knock over a department stores. Most recently, the character appeared in an episode of The Batman.

Given Merkel's unique abilities, casting him required finding an actor of impressive, almost superhuman flexibility. James fits that bill and then some, having blown the minds of AGT viewers and judges with his limb-rearranging audition earlier this summer. (Be warned: this is not for the faint of heart.)

James, who got his start as a performer at Canada's Wonderland theme park, has previously showcased his bendy skills as a Manibus Demon on Shadowhunters, as Channel Zero's Father Time, and as an undead mongrel on The Strain.

His Rag Doll joins the previously announced Cicada (played by Chris Klein) on Season 5's sure-to-grow list of threats for the S.T.A.R. Labs posse.

The Flash, Season 5 Premiere, Tuesday, October 9, 8/7c, The CW