Image caption Some parents staged a protest last week against primary school tests

A "rogue marker" leaked a test the day before it was taken on Tuesday by children aged 10 and 11 in England, the Department for Education has said.

The Sats answers had been mistakenly published on Monday on a password-protected website for test markers, schools minister Nick Gibb told MPs.

He said an individual then tried to leak them to a journalist but it appeared they had not become public.

The DfE blamed an "active campaign" to "undermine these tests".

The test was valid and had gone ahead as planned, Mr Gibb told MPs in response to an urgent question on the matter.

He said the spelling, punctuation and grammar (SPAG) test had been "mistakenly uploaded" by the test supplier, Pearson, onto a secure website, and that an individual with access to the site had then leaked the test to the media.

Mr Gibb said it was a "serious breach" but that "teachers and parents should have confidence in the test."

But shadow schools minister Nic Dakin, who posed the urgent question, said the matter was "just the latest in a sorry line of chaos in primary assessment".

Image caption The information was posted early for around four hours

The SPAG test was taken by 600,000 children in their final year of state primary school in England on Tuesday morning.

It is the second time in three weeks a primary school exam has been published in advance.

The government was forced to scrap a test for half a million children aged six and seven after it emerged that it had been posted with practice materials three months early.

Pearson apologised for this week's problem, which it said it was investigating.

In a statement the company said: "A small number of markers accessed the paper, although as contracted markers they are bound by confidentiality and have a duty not to share any papers.

"We do not have any evidence that the content of the paper has been compromised."

Pearson's chief executive John Fallon said the company believed 102 markers had seen the paper in the four hours it was available.

Mr Fallon told the BBC the information should have been uploaded to its secure website on Tuesday evening for markers to use, but was instead mistakenly uploaded on Monday evening.

"Unfortunately, in this case we have made a mistake which we are very sorry for," he said.

Media playback is unsupported on your device Media caption The shadow education secretary said ministers were "directly meddling in the curriculum and Sats"

The DfE said while the paper had not been put into the public domain, it appeared a "rogue marker" had then leaked the paper to the Guardian newspaper.

"We are aware that Pearson, the external marking supplier responsible for Key Stage 2 tests, published the Key Stage 2 grammar, punctuation and spelling test on its secure marker site for a short period of time," said a DfE spokesman.

"The site can only be accessed by Pearson's approved markers, all of whom are under secure contract. Any distribution of materials constitutes a clear breach of that contract."

Mr Gibb said the paper was still valid, despite the publication and said an investigation was under way.

Analysis

by Sean Coughlan, BBC News education correspondent

This has been an accident-prone year for primary school tests - and the amount of attention given to this latest leak is a reflection of a cumulative build-up of mistakes and controversy.

The English test was uploaded in error on to a website for test markers - who are mostly likely to be teachers - and then it's claimed a "rogue marker" among them tried to leak it further.

It's not often that primary school tests get associated with sabotage, but the Department for Education linked this to a campaign to undermine the tests.

Teachers' unions - long-term opponents of Sats tests - would say the government has already been doing a good job of that on its own.

This is the third test problem so far this year. A previous test for seven year olds was ditched when questions were accidentally published online.

And the baseline tests, intended for the reception calls, were called off when a pilot study showed the results were unreliable.

This has been in addition to a parents' protest and complaints that tougher tests are so difficult that even ministers struggle to answer them. Not to mention the U-turn on academies.

Ministers will feel themselves unlucky. But the Labour opposition will claim that the government's education team is losing its credibility.

Labour's shadow education secretary Lucy Powell said the leak was a further "body blow to parent and teacher confidence" in how the primary testing system was being run.

Speaking on Radio 4's World at One programme she said the matter was "not an isolated incident".

"The government has woefully mismanaged and caused absolute chaos and confusion in primary assessment and it's a travesty for those kids, it really is."

Ms Powell has now written to Education Secretary Nicky Morgan, saying there is "no confidence" among parents, teachers and school leaders in this year's primary assessments.

The letter calls on Mrs Morgan to offer a guarantee that primary schools will not be forced to become an academy on the basis of the tests.

'More rigorous'

Christine Blower, general secretary of the NUT, said the tests should be scrapped for this year.

"We didn't like the tests in the first place, but the fact is the tests are compromised and it just adds to the general sense of chaos, about not just the curriculum but in particular about assessment this year."

The new tests have been drawn up to assess children's grasp of the recently-introduced primary school national curriculum, which is widely considered to be harder than the previous one.

The more challenging tests have been controversial - with parents claiming they make children stressed and anxious.

Almost 50,000 parents have signed a petition calling for a boycott of primary school tests and some kept their children off school on 3 May in protest.

The government has said it is determined to raise standards and the tests reflect the "more rigorous curriculum", but that they should not cause pupils stress.

The debacle follows a government climbdown last week on plans to force all schools to become academies.