A-level students who had their places withdrawn at a grammar school after failing to achieve certain grades will now be allowed to return, it has been reported.

Legal action was being pursued against the governing body of St Olave’s grammar school in Orpington, south-east London, after two students were told they could not continue their A-level studies into Year 13.

The pupils, who cannot be named for legal reasons, failed to achieve Bs in any of their subjects taken in the first year of sixth form, lawyers said.

Days ago they were told they could return to the school but only to study a BTEC in health and social care.

But a statement, issued to The Guardian on the school’s behalf by the diocese of Chichester, said: “Following a review of the school’s policy on entry to Year 13, the headmaster and governors of St Olave’s grammar school have taken the decision to remove this requirement and we have today written to all parents of pupils affected to explain this and offer them the opportunity to return to the school and continue their studies.

“Our aim as a school has been and continues to be to nurture boys who flourish and achieve their full potential academically and in life generally. Our students can grow and flourish, making the very best of their talents to achieve success.”

Dan Rosenberg, a lawyer from Simpson Millar solicitors who has been acting for the families, told The Guardian: “That the school has reversed its position and dropped its policy is to be welcomed.”

He added: “We would expect all other schools with similar policies to do the same.”

Jo Johnson, Conservative MP for Orpington and the science and universities minister, wrote on Twitter: “Sensible move by St Olave’s – a great school.”

The high-achieving school, which will start its new term on 5 September, is said to operate a three-pronged policy to “maintain its exceptional A-level results”.

Year 12 pupils will normally have gained three Bs or higher if they wish to complete their studies in Year 13, the school’s sixth form rules and regulations state.

An email sent to the school’s Year 12 tutors in June said that pupils who scored a C would not be able to pursue that subject through to A level.

If a student scored a C, they must sign an agreement that the school reserves the right not to enter them for A-level examinations in any subject in which it is considered they will not score a B or above.