Taxpayers could pay a penalty of hundreds of millions of pounds for rows between Whitehall officials and "unacceptable" behaviour by top managers of a programme to pay farm subsidies, the Commons spending watchdog said.
The rows could cost the taxpayer hundreds of millions in spiralling costs and European Union penalties, said the Public Accounts Committee.
In a scathing report, the influential committee said "dysfunctional and inappropriate" behaviour by top officials was "inexcusable and deeply damaging" to the Common Agricultural Policy (CAP) delivery programme.
The MPs warned that in addition to delaying payments to farmers, the programme's costs had risen by 40% and financial penalties from the European Commission "are likely to increase significantly".
Committee chairwoman Meg Hillier said the Whitehall fiasco saw senior officials get involved in a "childish turf war" at the expense of hard-pressed farmers.
The CAP is the EU's framework of subsidies for farmers and 105,000 payments a year are made to English farmers and landowners, amounting to £1.8 billion.
Work on a new CAP delivery programme began in 2012, led by the Department for Environment, Food and Rural Affairs (Defra) along with the Rural Payments Agency (RPA) which hands over the money to farmers and the Government Digital Service (GDS).
The programme was aimed at producing a "single IT solution" for new regulations that came into force in 2014.
It was originally forecast to cost £155 million but this soared to £215 million and last March the online applications were replaced by a "paper-assisted digital" system after repeated IT failures.
The report noted that the GDS's insistence on an online application system "was inappropriate for farmers, who have a lower level of digital literacy than the general population, and there is poor broadband coverage in many rural areas".
Senior figures involved in the debacle included RPA chief executive Mark Grimshaw and the Government's chief technology officer, Liam Maxwell from the GDS.
The report said: "The failure of the department, the RPA and GDS to work together effectively resulted in serious detriment to the programme.
"Dysfunctional and inappropriate behaviour between senior programme officials impacted on implementation and delivery, potentially costing the taxpayer hundreds of millions of pounds in financial penalties.
"Neither the Government's chief technology officer nor the chief executive of the RPA was able to provide us with an acceptable explanation for their behaviour.
"The department's efforts to resolve issues, such as weekly meetings with the main protagonists, failed, and the Cabinet Office also did not halt the disruptive behaviour.
"Highly paid public servants need to get the job done and such behaviour is unacceptable."
The MPs recommended that Defra should "put in place measures to stop this ever happening again".
Giving details of the rows between the RPA and GDS, the report said the splits "at the top" were obvious to programme staff and "created a frustrating work environment for them" and were "preventing a culture of trust.
"In some cases, this included confrontational behaviour between senior programme staff at the RPA and GDS," the MPs said, adding that "such behaviours would not be tolerated in the private sector".
Mr Maxwell "explained that it can be challenging when someone comes in from the centre to try to change what was already in place".
He highlighted "cultural differences" between the teams involved, including "people dressing differently" and working on different floors of the same building.
The MPs noted that "as a result of the repeated failures of the programme, many farmers are being paid later than in previous years", with the RPA paying only 38% of farmers under the basic payment scheme on December 1, 2015 - the first day of the payment window - compared with over 90% in previous years.
Officials hoped the programme would help limit so-called "disallowance" penalties from Brussels to 2% of the value of the scheme but the report concluded they could now reach five times that in the early years - around £180 million a year.
Mr Grimshaw told MPs that the attempt to make the programme "digital by default" may have distracted from the task of protecting taxpayers from the penalties.
Ms Hillier said: "This programme was set up to deliver support to UK farmers. Instead, it delivered an appalling Whitehall fiasco.
"It was frankly embarrassing to learn of senior and highly paid civil servants arguing to the detriment of hard-pressed farmers.
"Explanations such as 'we worked on different floors' and 'we dressed differently' are a slap in the face to them and a dismal excuse for failures that could severely hit the public purse.
"A fundamental part of setting up this programme should have been to establish a clear and robust vision of the final product, focused on the needs of farmers. For it to end up as a digital testing ground was wrong-headed.
"The enduring mental image is of managers, having seemingly lost sight of the purpose of the project, devoting their energies to a childish turf war instead."
A Defra spokesman said: "The new CAP is widely acknowledged as the most complex ever and the task of setting up a new IT system to handle this additional complexity was a significant challenge.
"Throughout this period the collective focus has always remained on getting payments out to farmers as quickly as possible.
"In March 2015 there was a problem with one part of the online interface that enabled farmers to put data directly into Rural Payments, but the core of the system has always worked.
"Over 87,000 farmers registered on the system and it has been used to process and pay over 70,800 farmers - over 80% of all those eligible - their 2015 Basic Payment Scheme payment, totalling £1.11 billion.
"Almost all farmers in England will be paid by the end of this month and the Rural Payments system has been further improved for 2016 to make it easier for farmers to apply for CAP payments."