LONDON — David Bowie has written and recorded a new original song that will feature in the opening credits for the diamond heist TV drama series “The Last Panthers,” which world premieres at television market and conference Mipcom in Cannes early next month.

It is the first time Bowie has contributed original music for film or television in 20 years. The track was written following a meeting between Bowie and the director of the series Johan Renck during the filming of the show.

Renck said: “I was looking for one of the icons of my youth to write the music for the title sequence, but was presented with a God. His first response was precise, engaged and curious. The piece of music he laid before us embodied every aspect of our characters and the series itself — dark, brooding, beautiful and sentimental (in the best possible incarnation of this word). All along, the man inspired and intrigued me and as the process passed, I was overwhelmed with his generosity. I still can’t fathom what actually happened…”

Renck’s credits include “Bloodline,” “Breaking Bad” and “The Walking Dead” as well as music videos for Madonna, New Order, Beyoncé and Lana Del Rey.

The six-part series, jointly commissioned by pan-European pay TV operator Sky and Canal Plus in France, opens with a daring diamond heist before delving into the dark heart of Europe where a shadowy alliance of gangsters and “banksters” now rule.

The show stars Samantha Morton, who was Oscar nominated for “In America” and “Sweet and Lowdown”; John Hurt, who was Oscar nominated for “Midnight Express” and “Elephant Man”; and Tahar Rahim, who won France’s top cinema prize, the Cesar, for “A Prophet.” It also features a breakthrough role for Balkan actor Goran Bogdan (“Broj 55”).

The series is produced by France’s Haut et Court TV (“The Returned”) and the U.K.’s Warp Films (“This Is England”), and was filmed in Marseilles, Belgrade, Montenegro and London. It will screen on Canal Plus in France and on Sky Atlantic in the U.K., Ireland, Italy, Germany and Austria this autumn.