Stephen King has written the premiere episode of "Under the Dome" Season 2, which is titled "Heads Will Roll." It was jealousy that has made him pen down the first episode of the show that is based on his book of the same name.

In an interview with Los Angeles Times, the prolific, well-known writer revealed that he wrote the first episode of "Under the Dome" Season 2 because he "knew that George R.R. Martin had written a few episodes of "Game of Thrones," and I was very jealous."

The writer also said that it's a "no-lose situation" for him, as "If it's good, I just say it was based on my work. If it's bad, I just say, 'Well, that wasn't my idea'."

King has said that by writing the first episode he has "set the arc in motion for the season. Also, he said that it gave him a "little more input into what was going to happen."

He has also written a role for himself in the premiere episode. He will be seen making a cameo appearance in "Heads Will Roll."

Talking about putting King in the writer's chair for the first episode, Neal Baer, creator of the show, said to Los Angeles Times, ""We thought this would be a great way to solidify the support of the fans but also put his creativity and imagination to work. Stephen is very supportive and collaborative and has always said to us from the beginning, 'It's your baby'."

"Under the Dome" Season 2 is scheduled to premiere on June 30, 2014. King has warned that no one is safe in Season 2. Baer has confirmed that there are two deaths in the first episode, but this does not mean that the dead will remain dead.

Meanwhile, Dean Norris, who plays Big Jim, has confirmed that there is some killing in the upcoming, new season of "Under the Dome." In an interview with ET, the actor said, "there be some killing ... and Big Jim is usually the guy whose killing. Yeah, we take some people out. We have a high body count, this year too."