Glee star Grant Gustin has landed the coveted role of Dr. Barry Allen, a.k.a. Flash, in Season 2 of Arrow. The actor was one of three actors in contention for the role, alongside James Mackay (Don't Be Afraid of the Dark) and Matt Barr (Hatfields & McCoys).

The actor will appear in three episodes this season, Episode 8, Episode 9 and Episode 20, the last of which will serve as a back-door pilot for a potential spin-off series we first reported on back in July. Here's what the actor had to say in a brief statement.

"I'm unbelievably excited. I've been a lifelong fan of DC Comics, so I can't be more honored and can't wait to get started."

Arrow co-creators Greg Berlanti and Andrew Kreisberg are co-writing all three of The Flash episodes along with Geoff Johns. All three will serve as executive producers if the spin-off gets picked up to series, along with David Nutter, who is directing the episodes. The first two episodes will be set in Starling City, with the third set in Barry Allen's Central City.

In the series, Barry Allen is described as an assistant police forensic investigator in Central City, who comes to Starling City to investigate a string of unsolved robberies that may have a connection to a tragedy in his past.

Andrew Kreisberg had this to say about the character in a statement.

"Part of the fun for the audience is to see how we view our Arrow take on the Flash legacy. Some of it will feel very familiar to DC Comics, some of it hopefully will feel different, fresh and exciting. The same way we approached Arrow is the same way we're approaching Barry. There will be extraordinary events in the world and the characters will react in the same way."

Geoff Johns also added his own statement.

"We're also exploring a very personal story for Barry -- life as a forensic scientist and the people around him, the tragedies and how he deals with them -- in a very different way than Oliver Queen."

In related news, The CW Network has released a Season 2 preview video featuring new footage and interview segments with series star Stephen Amell, before the season kicks of with "City of Heroes" on Wednesday, October 9.