A spelling test due to be taken by thousands of seven-year-olds in England next month has been accidentally published online as a sample paper, months ahead of the exam.
The mistake was discovered by a teacher at a school trialling the final paper. They realised a pupil had already seen the material.
The Department for Education (DfE) told the BBC that the "serious error" was "deeply regrettable".
Around half a million children will take the Key Stage 1 spelling and grammar tests in May when they are at the end of Year 2. The results are used to measure the progress of pupils.
Information on the DfE's website for test developers says that the other intended uses are to "hold schools accountable for the attainment and progress made by their pupils; inform parents and schools about the performance of individual pupils; and enable benchmarking between schools, as well as monitoring performance locally and nationally".
The results aren't used to rank schools but sample papers are provided by the Government online to help children and teachers practice.
Teacher Charlotte Smiles was trialling the real paper early and told the BBC that a child said he knew all the answers and appeared to know what was coming next.
Another teacher asked him if he had seen the test before and he answered coyly.
She said: "Because of the way this child was behaving, I went and checked on the DfE website and I found this exact test published as a sample paper.
"It's actually been there since January 26."
Smiles said she contacted the DfE but there would not be enough time to rewrite the paper.
A DfE spokesman said the paper had been removed from the website.
He added: "Fortunately, this is a Key Stage 1 test which is provided to schools to support teacher assessment judgments."