In a shakeup at HBO, comedy programming chief Casey Bloys has been promoted to president of series, late-night and specials, while Michael Ellenberg is exiting his post as head of drama series.

Ellenberg will segue to a production deal with the network.

Rumors about Ellenberg’s departure have been circulating for a few weeks, but earlier this month the exec was front and center at HBO’s presentation at the Television Critics Association winter press tour. His move to producing comes as HBO has had its ups and downs with new series. “Game of Thrones” is one of the most valuable franchises in TV, but other shows on his watch, including “True Detective’s” second season and “The Leftovers,” have had a mixed track record.

There have been rumblings of difficulties on the set of the upcoming “Westworld,” which recently shut down production so exec producers Jonathan Nolan and Lisa Joy could catch up on the final scripts. And there’s still no word on a third season of “True Detective.”

The network has high hopes, however, for the period rock ‘n’ roll drama “Vinyl,” which bows Feb. 14, given its auspices of exec producers Martin Scorsese, Terence Winter and Mick Jagger. Ellenberg was also a major force in bringing Reese Witherspoon, Nicole Kidman and David E. Kelley together with Laura Dern and Shailene Woodley for the limited series “Big Little Lies,” which is now lensing.

Bloys, meanwhile, has been on a roll with buzzy comedies including “Veep,” “Girls,” “Ballers,” “Silicon Valley” and “Getting On.” He’s also overseen much of HBO’s late-night programming and comedy specials as exec VP of programming since 2013.

HBO said it was Ellenberg’s decision to step down. Ellenberg was well regarded by many of the producers and showrunners he worked with but he was said to have faced internal conflicts on creative matters that contributed to his departure from his exec post.

“It is never easy when someone of Michael’s talent decides to move on. He leaves us with an exceptional slate of drama programming, including our upcoming premiere of ‘Vinyl’ and the recently announced David Simon series ‘The Deuce.’ Michael will be missed and I thank him for graciously agreeing to assist in this transition period,” said Michael Lombardo, HBO programming president. “Casey is a seasoned executive and this presents an exciting opportunity to expand his role at the company. He is an esteemed programming executive that the industry holds in the highest regard. We believe that by consolidating drama and comedy under his leadership that both genres will greatly benefit.”

Bloys joined the company in 2004 in the HBO Independent Productions unit, and moved to the programming side in 2006.

Ellenberg joined HBO as senior VP in 2011 and was upped to exec VP, alongside comedy chief Bloys, in October 2013 following Sue Naegle’s departure as entertainment president. In October, HBO tapped feature vet Nora Skinner as senior VP focusing on drama series, bolstering its bench in drama series.

Before HBO, Ellenberg was senior VP at Scott Free Productions, where he was a producer on such films as “Prometheus,” “Robin Hood” and “Cyrus.” Earlier in his career he worked for Scott Rudin Productions.

(Pictured: Michael Lombardo, Casey Bloys and Michael Ellenberg)