The American media giant Disney has been handed a record £31.9m tax credit by HM Revenue & Customs in return for agreeing to film the next instalment of its Avengers movie series in Britain.

It is believed to be the largest amount ever paid out under the government’s Film Tax Credit scheme since it was launched in 2007. It allows movies with expenditure of more than £20m to claim back up to 20 per cent of their production costs and, according to accounts released this week, in just four months Disney spent a staggering £155m on making Avengers 2.

Avengers Assemble was released in 2012 and became the third-highest-grossing movie of all time with a total box office take of £880m according to the industry analyst Box Office Mojo. It starred Scarlett Johansson, Robert Downey Jr and Samuel L Jackson, who will all reprise their roles in the sequel, which is being filmed at Pinewood Studios in Buckinghamshire.

The budgets of most movies are usually a closely guarded secret but the tax relief scheme lifts the lid. The costs of movies qualifying for relief are consolidated in a single company which has to file publicly available accounts.

However, they usually have code names so they do not blow their cover when filing for permits to film, and the company behind Avengers 2 is called Assembled Productions 2.

Its accounts for the four months to 2 August show that HMRC paid it £26.3m, giving it a total of £31.9m since production began in February 2013. That far exceeds the average, as data from HMRC shows that between 2007 and 2013 payments to large-budget films averaged £4.6m per claim.

According to the accounts, Disney has so far spent £208.1m on making Avengers 2, which is “in line with the agreed budget”. It includes £10.2m paid to the production staff, which peaked at 421. To qualify for the tax relief a movie must be considered British, which requires about 70 per cent of its labour costs to be paid to European workers and at least 25 per cent of the production costs to be spent within the UK.

It keeps British staff in jobs and, according to the British Film Institute (BFI), the film tax relief costs the Treasury about £150m annually but in terms of gross domestic product it contributes £12 for every pound spent. The tax break has led to the UK being ranked third in the world, behind the US and Japan, in terms of the value of film production spending, according to the research company IHS.

Data from the BFI shows that last year 81 per cent of total UK production spending was on films financed outside the country. However, some say that the tax break could be a poisoned chalice rather than a happy ending.