The right of the Catholic church to fire religious education teachers in state schools for contravening an unwritten moral and political code is being challenged in the Constitutional Court in Madrid.
The court is investigating the case of Canary Islands teacher Margarita Perez, sacked after joining her colleagues in a strike and expressing her opinion in the local newspaper.
It has the right to pronounce the church's behaviour unconstitutional and force a change in the law, giving RE teachers the same status as their peers.
At present RE teachers in state schools are paid and contracted by the education department of the regional government. However, the Catholic church retains the right to propose teachers for nomination and to review every teacher's contract every year.
This gives the church a licence to fire anyone who does not conform to its ideal form of behaviour - even though 90 per cent of RE teachers are lay with no links to the church, whereas in the Franco era most were priests.
Until four years ago, primary school RE teachers worked without fixed contracts, but their secondary school counterparts maintained the same rights as staff in state schools.
Then the Aznar government reviewed the 1978 agreement between church and state, making the contracts of all state school RE teachers subject to annual renewal by the church.
Four teachers went on a 28-day hunger strike in protest.
Since then, scores of teachers have lost their jobs for offences such as marrying in a civil service, joining a left-wing political party, joining strikes called by the unions, taking legal advice after reductions in their timetables, not being married to their partners, or writing articles in newspapers.
Scores of cases in the lower courts have forced education departments to pay damages and back pay to dismissed teachers.
In moving the Perez case to the Constitutional Court, the Superior Court of the Canaries has signalled its belief that there is a case for changing the law.
Luis Guridi, the vice-president of the RE teacher's union FEPER, said: "The Constitutional Court must be persuaded to move quickly on the matter."
The spokesman for the Vatican Episcopal Conference for the Canary Islands, which dismissed Ms Perez, refused to comment.