Mr Forstater is suing Idle, Palin and Jones and the two other surviving Pythons, John Cleese and Terry Gilliam, who are abroad and not expected to give evidence. The sixth member of the team, Graham Chapman, died in 1989.

If successful, the producer’s claim is expected to run into hundreds of thousands of pounds.

Tom Weisselberg, appearing for Mr Forstater, described the musical in court as "a huge international commercial success".

It has also generated a significant amount of spin-off merchandising income.

But the Pythons were "unjustifiably attempting to secure more money from Spamalot at the expense of Mr Forstater and his company", the court heard.

Mr Weisselberg told Mr Justice Norris: "Regrettably, the parties have not been able to resolve the dispute.

"Mr Forstater is in difficult financial circumstances and has been forced to bring these proceedings."

The film producer was made bankrupt in June. Last month, the bankruptcy was annulled and he is now involved in an independent voluntary arrangement (IVA) to deal with his debts.

With a score written by Idle and John du Prez, Spamalot tells the story of King Arthur and his Knights of the Round Table but with the cows and killer rabbits familiar to fans of the film thrown in.