http://www.economist.com/blogs/easternapproaches/2013/07/russian-politics-0
Few doubt that instructions to release Mr Navalny temporarily from police custody came from the Kremlin—just as the instructions to put him in jail earlier. The idea seems to be to give Mr Navalny a chance to participate in the Moscow mayoral elections on September 8th as the main opponent and a sparring partner to Sergei Sobyanin, the incumbent. Mr Sobyanin has called elections abruptly last month as a means to gaining political legitimacy. (At the moment he is a Kremlin appointee.) To make the elections meaningful he needed an opponent who would be recognised as a genuine opposition figure. Mr Navalny, one of the Kremlin’s main critics who had labelled its ruling United Russia a party of “thieves and swindlers” suited this role not least because he was way behind Mr Sobyanin in opinion polls for the mayor’s job which is widely considered an administrative rather than a political post.