(Update: Bryan Singer says he was fired from “Bohemian Rhapsody” because 20th Century Fox wouldn’t give him time to care for a sick parent.)

Bryan Singer has been fired from directing 20th Century Fox’s Freddie Mercury biopic “Bohemian Rhapsody.”

A studio spokesperson told TheWrap that Singer was “no longer the director” of the project, which stars Emmy-winning “Mr. Robot” actor Rami Malek as the legendary British rocker.

The film is weeks away from wrapping, and is still slated for a December 2018 release. A new director will be named in the coming days.

Also Read: 'Bohemian Rhapsody': Rami Malek Stuns as Freddie Mercury in New On-Set Photo

The decision came after Singer exhibited a pattern of unreliable behavior on set, two individuals familiar with the production told TheWrap, including long periods of absence and lateness.

A third individual close to the situation described Singer as a “f—ing lunatic.”

Representatives for Singer did not return TheWrap’s request for comment. News of his firing was first broken by The Hollywood Reporter.

Singer will still be paid under the provisions of his contract, typically referred to as a “pay or play” clause. This means the studio can remove him from the job for any reason without fear of legal repercussions — as long as they pay him.

Also Read: Fox Halts Production on 'Bohemian Rhapsody' Due to Bryan Singer's 'Unexpected Unavailability'

In addition to straining his relationship with Malek, Singer’s behavior led to the temporary resignation of actor Tom Hollander, who was cast as the manager of Mercury’s band, Queen. He eventually returned to the role, THR reported.

Hollander’s reps did not return TheWrap’s request for comment.

Production on the film formally shut down on December 1, after a Signer rep said he was absent over “a personal health matter concerning Bryan and his family.” At the time, the studio only referred to the director’s “unexpected unavailability.”

Also Read: Bryan Singer to Direct Fox's X-Men Pilot

Singer and Fox have a nearly 20-year relationship, as the director has helmed several installments in the studio’s “X-Men” franchise, including the 2000 original, and retained producer credits on all of the subsequent sequels.

He most recently served as director-producer on last year’s “X-Men: Apocalypse,” starring Jennifer Lawrence, James McAvoy and Michael Fassbender.