Interesting tidbit in an NYT piece about Ayatollah Khamenei. It turns out the two were political opponents when Moussavi was Prime Minister and Khamenei was President in 1981. This is one of the first pieces of information that helps to explain why Khamenei has been willing to climb so far out on a limb for Ahmedinejad. The smart play seemed to be to let Moussavi win and allow Ahmedinejad absorb popular anger over his misrule. But this suggests that Khamenei might see Moussavi as a personal rival.
In the same article, it also turns out that Moussavi is challenging Khamenei's religious authority within the Shiite establishment. That move can only raise the stakes of the confrontation.