A crisis has developed in Iran over the disqualification of thousands of reformist candidates from the 20 February elections by the hardline Council of Guardians.
Mr Khamenei alone has the authority to resolve a deadlock
The BBC's Jim Muir looks at the issues behind the row.
What is the dispute all about?
The Council of Guardians has announced a list of more than 5,400 candidates who have been approved to stand for election around the country.
The total is lower than in the last election because more than 2,300 candidates - four times as many as last time - have been disqualified.
These included many of the best-known figures in the reform movement, among them Mohammad Reza Khatami, the president's brother, who heads the biggest reform faction and was deputy speaker of the outgoing parliament.
Many candidates were deemed ineligible because of a supposed indifference to Islam and to the constitution, or were accused of questioning the supreme leader's powers.
At first it seemed likely or at least possible that the council was engaging in political brinkmanship, and would later reinstate a lot more candidates - including the 80 or so sitting reformist members of parliament - in the final list.
But it has given little ground and some of its elements seem determined to eliminate the reformists from office.
Three days before the list's publication, Iran's supreme leader Ayatollah Ali Khamenei signalled he would not intervene any more on the reformists' behalf, and when the list emerged on 10 February it contained no surprises.
Can the elections be stopped?
President Khatami's reformist government asked the Council of Guardians, the unelected, right-wing body which supervises elections, for a postponement, but it refused.
The interior ministry, which actually administers the polling, has said free and fair elections are not possible.
Provincial governors and other officials who would be involved in running the elections, have all put their resignations on the table because of the high number of candidates disqualified by the Council of Guardians.
Reformists suspect the hardliners may be planning to call in Revolutionary Guards or other pro-regime bodies to administer the polls, and this could lead to President Khatami and his administration resigning en masse.
How much interest is there in this row among the population at large?
Not a lot, it seems. Some people have voiced the suspicion that the whole crisis has been cooked up as a scenario to kindle interest in a lacklustre election.
Others see it as a family squabble.
There have been no spontaneous shows of support for the embattled reformist MPs from the public.
It is largely disillusioned with the reformists' performance in office, where they have been unable to prise loose the grasp on power of the entrenched hardline minority.
The general expectation is that the turnout for the election will be poor.
How popular are the reformists?
It is hard to tell. Last year's disastrous showing in local elections - when conservatives regained Tehran city council by default because only their hard core of support showed up - does not necessarily reflect the overall picture.
While the reformists have been blocked from achieving much in office, some voters may have been hoping to re-elect them as a more favourable option than leaving the field open for a right-wing return to parliament and government.
What can they do now?
Mohammad Reza Khatami, who won more votes than any other candidate in the 2000 general elections but has still been disqualified, has said that "under the present structure of the ruling system, this is the end of the reform movement".
His faction, the Participation Front, has now said it will not field any candidates in this election. Many of them have been weeded out anyway.
But some reformists believe they should continue seeking access to any official bodies they can under any conditions, as this is the only alternative to a resort to violence to bring about the change which a large majority of Iranians appear to want.
Some groups who are fielding approved candidates have said they will take part in the elections to try to prevent a right-wing monopoly.
But those reformist figures who could be about to find themselves ejected from the system may take up more active but still peaceful ways of promoting change, such as calling for strikes or civil disobedience.
As for the elections themselves, they could bring about instability and a minority, right-wing government that might be shunned internationally and reverse much of the detente which President Khatami has fostered in Iran's external relations.