Oscar-winning actor Mahershala Ali has signed a deal for the third season of the HBO anthology series True Detective.

The Moonlight star confirmed the news on Instagram by posting an image of the show's first season, which starred Matthew McConaughey and Woody Harrelson, along with the caption: "Season 3 @hbo."

It was first reported that the actor was being lined up for a leading role in the series earlier this month.

The first season was rabidly-received by both fans and critics. However the second run, starring Colin Farrell, Rachel McAdams and Vince Vaughn, failed to garner as much acclaim, leaving the future of the show in question with HBO.

A new instalment is now looking more promising following Ali's confirmed involvement, with HBO's president of programming, Carey Bloys, telling the Television Critics Association that they were still in the process of finalising the details for the potential third run. He also said he had read five finished scripts for the new series from creator Nic Pizzolatto.

According to Deadline, he said: "They are terrific... I was very impressed and excited. We are talking to directors, and when we have a director we want to hire, it will be a go."

Bloys added that the network is currently on the hunt for directors. Cary Joji Fukunaga directed all eight episodes of the first season, while the second season was split up among directors.

Colin Farrell in True Detective's second season