Some schools are still missing their test results
The firm responsible for this summer's national test marking "shambles", ETS Europe, has had its contract ended by exams watchdog the QCA.
Problems with the marking of the tests, taken by 1.2 million 11 and 14 year olds in England, delayed results and prompted concerns about quality.
ETS is to pay back £19.5m and cancel invoices worth £4.6m. The total contract for 2008 was worth £39.6m.
The QCA said the five-year £156m contract was ended by "mutual consent".
The National Assessment Agency (NAA) will handle the review process, while ETS Europe will continue to work on concluding this year's national test operations, and publish any outstanding results.
There will be no further payments made to ETS.
Ed Balls says parents will be relieved at the scrapping of the Sats contract
Education Secretary Ed Balls said the tax payers' position had been safeguarded by the deal because two-thirds of the money spent on the contract was being returned.
He told BBC News that the £15.5m ETS received for their work represented a loss to them and was smaller than the amount they had spent in the UK.
The financial settlement reached means the government is able recover some of its costs, including those of re-tendering and re-marking.
The delivery of next year's tests would be carried out as a one-year contract, tendering for which would start in September, Mr Balls said.
He said: "Let's put the national interest first and get things sorted for next year so we do not see a repeat of the shambles that we have seen from ETS in recent weeks."
QCA chief Ken Boston said: "ETS Europe was selected due to the strength of their worldwide experience in delivering large-scale assessments.
The vice-president of ETS Europe apologising in July
"It is disappointing that the issues with this year's national curriculum test results have meant that the partnership between QCA and ETS must end early."
Mr Boston said it was his responsibility to fix the problems that had emerged.
ETS Global BV managing director Zoubir Yazid said ETS had apologised to schools for the marking delays.
"As a subsidiary of a global, non-profit company, we are dedicated to assuring quality and equity for all pupils, and we are sorry that the results this summer were delayed for some schools.
"However, we would argue that the quality of the marking is high, due to the stringent new checks that we introduced this year."
Problems with the summer's marking schedule first emerged when Education Secretary Ed Balls announced that Key Stage 2 and Key Stage 3 results were to be delayed.
But markers had been warning of problems with the administration of the tests and the computers system for some time.
Ministers then announced an independent inquiry headed by Lord Sutherland, who was to examine issues surrounding the delivery of the tests. This inquiry will continue and is due to report in October.
Meanwhile ETS set up emergency marking centres in an attempt to get the work done.
So far some 95% of Key Stage 3 results have been delivered to schools. This breaks down as 92.8% of English, 96.6% of maths and 96% of science results returned.
The return figure for Key Stage 2 is higher, with 99% of results being returned as of 31 July. However, it is not clear what proportion of schools are still missing some results.
Shadow education secretary Michael Gove said: "Ministers bear direct responsibility for signing up with a firm that let down children and teachers so badly.
"We are glad that sense has prevailed and hope that ministers can now get their act together to make sure there is not a repeat of this fiasco next year.
"In the meantime, Ed Balls must let us know exactly what is happening with next year's tests and who will be administering them."
Liberal Democrat schools spokesperson Annette Brooke said ETS had demonstrated pure incompetence and should not get "a penny for this year's fiasco".
"Many children are still waiting for their results, which are now nearly six weeks late," she said.
The news of the contract being ended has been welcomed by the teaching unions.