Johnny Depp has Al Pacino to thank for getting him back behind the camera for “Modi” — his first directorial effort in 25 years.

The film comes just two years after Depp’s personal life took the spotlight in his successful 2022 defamation suit against ex-wife Amber Heard.

The “Pirates of the Caribbean” star, 60, spoke to Entertainment Tonight about the “transformative experience” of working on the film, which takes place over two days in the life of Italian artist Amedeo Modigliani (played by Riccardo Scamarcio) amid the backdrop of World War I Paris.

Depp — who last directed 1997’s “The Brave” — says Al Pacino, who appears as French art collector Maurice Gangnat, “requested that I make” the film.

Johnny Depp poses in the portrait studio during the Red Sea International Film Festival 2023 on Dec. 2, 2023 in Jeddah, Saudi Arabia. (Photo by Tristan Fewings/Getty Images for The Red Sea International Film Festival)

“How could I refuse Pacino?” said Depp, who co-starred with the legendary actor in 1997’s “Donnie Brasco.”

Amedeo Modigliani, Italian painter and sculptor, is pictured in 1909. (Photo by Hulton Archive/Getty Images)

“Embarking on this cinematic journey as the director of ‘Modi’ has been an incredibly fulfilling and transformative experience,” he told the outlet. “I would like to express my profound gratitude to the entire cast, crew, and producers for their unwavering commitment and creativity.”

Art enthusiasts view paintings by Amedeo Modigliani at The Jewish Museum in New York 21 May, 2004. (DON EMMERT/AFP via Getty Images)

Johnny Depp poses in the portrait studio during the Red Sea International Film Festival 2023 on Dec. 2, 2023 in Jeddah, Saudi Arabia. (Photo by Tristan Fewings/Getty Images for The Red Sea International Film Festival)

He thanked Pacino, 83, “for generously contributing his talent and dedication to this project,” which was predominantly filmed in Budapest, Hungary.

Depp dubbed the film “a testament to the collaborative spirit of independent filmmaking, and I am excited to present this unique and compelling story to the world.”

The “Edward Scissorhands” star’s roles have been few and far between since Heard’s 2018 Washington Post op-ed, in which she referred to herself as “a public figure representing domestic abuse.”

Though she didn’t name Depp — to whom she was married from 2015 to 2016 — in the piece, she had previously leveled allegations of domestic violence against him. Depp has repeatedly denied the “Aquaman” star’s accusations.

Depp sued Heard for $50 million, claiming the op-ed was an act of defamation. She filed a $100 million counterclaim due to her ex-husband’s lawyer denouncing her claims as a hoax.

After six weeks of a trial that aired every bit of the former couple’s dirty laundry and dominated public discourse online, a Virginia judge ruled that Depp should be awarded over $10 million in compensatory damages and $5 million in punitive damages.

The latter was capped by the state. After reaching a settlement, the two dropped their respective appeals and Heard paid $1 million to Depp.