Michael Gambon has taken the lead role in the upcoming adaptation of JK Rowling's novel The Casual Vacancy.

The Dublin-born actor will play the adulterous parish council leader Howard Mollison in the three-part mini-series, which is to start filming in early July.

Gambon already has strong Rowling credentials, given his role as Professor Dumbledore in the third Harry Potter film, a role he took over following the death of Richard Harris.

The Casual Vanancy was Rowling's first novel after the Harry Potter series. The narrative pivots around a local council election in the fictional West Country town of Pagford. As the story begins, a parish councillor dies and the by-election candidates find their darkest secrets revealed on the parish council online forum. 

The novel was an immediate bestseller and has sold more than six million copies since it was published in 2012.

In the BBC adaptation, Julia McKenzie will play Mollison's wife, Shirley, and Rufus Jones his son, Miles. Keeley Hawes will take the role of Miles's wife and Rory Kinnear will play Barry Fairbrother, whose death effectively causes the election to be called.

Monica Dolan, who won a Bafta for her portrayal of Rose West in ITV drama Appropriate Adult, will also star, with Simon McBurney (Rev's archdeacon Robert) playing her husband.

Rowling's next novel will explore phone hacking with a shady journalist among its characters. The writer gave evidence to the Leveson inquiry and has protested against press intrusion into her life.