Schools and colleges have been told to rank students within each grade for each subject after GCSE and A-level exams were cancelled amid the coronavirus pandemic.

England's exams regulator Ofqual has instructed teachers to provide grades for pupils which reflect "fair, objective and carefully considered" judgments of the results they believe each student would have been most likely to achieve if the exams had gone ahead.

Exam boards will be contacting schools and colleges after Easter to ask them to submit their judgments by a deadline that will be no earlier than May 29.

Schools must not share these grades with students and parents until final results are issued. It is hoped pupils will receive their grades before the pre-planned results days in August.

Schools across the UK closed their doors to the majority of students a fortnight ago. Pupils were told that teacher assessments would help grade their GCSEs, AS levels and A-levels.

Pupils previously took to Twitter under the hashtag #SchoolclosuresUK to share their frustrations, with some afraid that poor relationships with teachers could affect their final mark.

On Friday, Ofqual said teachers' judgments on grades should take into account a full range of evidence - including classwork, non-exam assessment, mock exams or previous results.

If grading judgments in some schools and colleges appear to be more severe or generous than others, exam boards will adjust the grades of students accordingly, the regulator has said.

Students will also have the opportunity to sit exams at the earliest opportunity in the new academic year. If they choose to do this, both grades will stand.

Schools are not required to set additional mock exams or homework tasks for students during closures to determine grades, Ofqual has said.

Ofqual chief regulator Sally Collier said: "School or college-based assessment already has an important role in many GCSEs, AS and A-levels, and in extraordinary circumstances such as these schools and colleges are best-placed to judge the likely performance of their students at the end of the course.

"We have worked closely with the teaching profession to ensure that what we are asking is both appropriate and manageable, so that everyone can have confidence in the approach."

She added: "We have published a message to students to reassure them that we, and exam boards, will do everything we can to make sure that, as far as possible, grades are fair and that they are not disadvantaged in their progress to sixth form, college, university, apprenticeships, training or work because of these unprecedented conditions."

Education Secretary Gavin Williamson said: "Cancelling this summer's exams was a necessary step to help fight the spread of coronavirus by asking people to stay home, protect the NHS and save lives.

"Despite the difficult circumstances we are facing, this guidance provides assurance to students, parents and schools that grades awarded this summer will accurately reflect students' abilities, and will be as valid this year as any other."

Education organisations were largely welcoming of the guidance, but they said more details were needed on how vocational qualifications would be awarded and how the appeals process would work.

Mary Bousted, joint general secretary of the National Education Union, said: "In any qualification system, but particularly one created in these circumstances, it helps with consistency and fairness to have moderation and oversight from the regulator.

"However, many teachers will be uncomfortable with the concept of rank-ordering students, especially if it amounts to a rationing of grades based on previous performance data.

"Moderation does not have to mean rank-ordering students nor rationing of success and in an ideal use of teacher judgments during awarding, this would be possible."

Jo Grady, general secretary of the University and College Union, said: "These are difficult and unprecedented times and we welcome the speed with which these plans have been pulled together. We need to have similar proposals for vocational qualifications and time to properly respond.

"Our primary concern is that disadvantaged students are the ones most likely to miss out. Research shows that they fare badly when it comes to predicted grades and they are less likely to be able to put life on hold and delay sitting exams, or have access to the tools required to navigate any appeals system."

Paul Whiteman, general secretary of the National Association of Head Teachers (NAHT), said: "Many schools, colleges and their students will have been anxiously awaiting this information and whilst there is not a perfect solution, this is pragmatic and the fairest approach to take in these exceptional circumstances.

"Of course, this is not a seamless solution. Students will have been expecting to go through a very different process. However, their grades will now be determined by the professionals who know them best; professionals who are well-equipped to make these judgements, and we hope that gives students confidence that they are in safe hands.

"Where pupils are not content, appeals are possible and autumn exams are being discussed."