Opposition leaders Mir Hossein Mousavi and Mahdi Karroubi have asked for permission to hold a Feb. 14 rally to honor the uprisings in Egypt and Tunisia.
But State Prosecutor Gholam Hossein Mohseni Ejehi said those seeking to show solidarity should join a state-organized rally marking the 32nd anniversary of Iran's 1979 Islamic revolution on Friday.
Ejehi said that choosing another date would be divisive and politically motivated, state media reported.
"Anybody who really intends to support the heroic people of Egypt will attend the rally Friday, along with people from all walks of life," he said. Ejehi issued a vague warning against any efforts to stage an alternative rally, saying: "Our people are vigilant and will respond ... if necessary."
Iran crushed protests against a disputed 2009 election and the opposition has not staged rallies in more than a year. Iran's opposition says the re-election of President Mahmoud Ahmadinejad was rigged.