Liam Payne filmed a show for Netflix months before his tragic death at age 31.

The former One Direction member served as a judge and mentor on “Building the Band,” a new talent competition series.

The show was greenlit by Netflix in May and produced by UK’s Remarkable Entertainment. Filming wrapped in August, according to Deadline.

However, the show’s fate is now unclear after Payne fatally fell from a balcony in Argentina last week.

Liam Payne. Instagram/kateecass

“Building the Band” was described by Netflix’s Tudum as “an unscripted series in which the next great pop group is created sight unseen.”

The series, according to Deadline, brought together 50 singers who attempt to form their own band without ever seeing each other. The singers “had to connect via musical compatibility and chemistry before finally meeting.”

Payne was joined by The Pussycat Dolls alum Nicole Scherzinger and Destiny’s Child alum Kelly Rowland as the judges and mentors. AJ McLean from The Backstreet Boys was the host.

Liam Payne.

“’Building the Band’ is a brave and bold undertaking for all involved as we hand over power to the singers themselves to form their own band based on chemistry first,” executive producer Cat Lawson said in a statement to Netflix’s Tudum over the summer.

Lawson added, “With looks out of the equation, can they create a deeper connection with their bandmates? With limited bands, there are difficult decisions and heart-stopping moments along the way, but ultimately the outcome is truly amazing, with bands forming who in my opinion are worthy of the very biggest stage!”

Nicole Scherzinger at the “Sunset BLVD” opening night in NYC on October 20. Bruce Glikas/WireImage

The series reportedly concluded with three live shows filmed in front of an audience at Aviva Studios in Manchester, England in August.

At the time, some of Payne’s fans posted on social media about meeting the singer. One fan wrote, “Liam was so sweet, it was amazing to meet him again after so many years.”

Kelly Rowland at the “Emilia Perez” premiere in LA on October 21. Getty Images for Netflix

According to Deadline, another person revealed that audience members sang “Happy Birthday” to Payne who turned 31 the day before the final live show.

In the wake of Payne’s death, sources told The Hollywood Reporter that the “Building the Band” producers were “shocked” by the tragedy, and that it’s too early to make decisions around the future of the show.

The Post has reached out to Netflix and Remarkable Entertainment for comment.

Liam Payne at Annabel’s 60th Anniversary Party in London in June 2023. Dave Benett/Getty Images for Annabel’s

AJ McLean at the 2024 iHeartRadio Music Festival. Stephen Greathouse/Shutterstock

Rowland, 43, talked about her experience working with Payne in an interview with People in August.

“Liam is absolutely hilarious. I didn’t know how funny he was, so I’m getting to know him, and he is so cool,” she said.

Scherzinger, meanwhile, was one of the judges on “The X Factor UK” in 2010 where Payne got his start when he was put into One Direction alongside Harry Styles, Niall Horan, Louis Tomlinson and Zayn Malik. Scherzinger was a huge part in creating the band alongside Simon Cowell.

Nicole Scherzinger at the “Sunset BLVD” opening night in NYC on October 20. Bruce Glikas/WireImage

Kelly Rowland in an Instagram photo.

The group went on to become one of the best-selling boy bands of all time before they went on an indefinite hiatus in 2016.

McLean, 46, posted a tribute on Instagram after Payne’s death, where he wrote, “Words cannot begin to express the pain I have for this man and the great loss we have endured! We became very close almost immediately and shared so many stories , laughs, and life experiences. Gone too soon my friend.”

AJ McLean and Liam Payne. aj_mclean/Instagram

Payne passed away on Oct. 16 after falling from his third-floor balcony at the CasaSur Palermo Hotel in Buenos Aires, Argentina. He was allegedly “acting erratic” in the hotel lobby before his death.

Liam Payne at his Argentina hotel before his death. America TV

The boy band alum fractured his skull and died instantly from “very serious injuries,” according to Buenos Aires Emergency Services Chief Alberto Crescenti.

A new report claimed Payne had a toxic mixture of drugs in his system when he fell, including “pink cocaine” — a combination of methamphetamine, ketamine and ecstasy.

A memorial for Liam Payne in LA on October 21. APEX / MEGA

Fans visit the Buenos Aires hotel where Liam Payne died. Getty Images

While officials initially said Payne had “jumped,” the autopsy report said he fell.

Investigators are still working to determine if the tragedy was accidental or intentional.