The mayoral campaign in Sochi was full of surprises. Of course, it was not a "full-fledged political battle," as President Dmitry Medvedev described it, but it was a significant improvement compared to mayoral races of recent years. Usually, the main challenge to the ruling party's candidate -- most often the incumbent -- is either from the Communist Party or United Russia itself or a loyal candidate from the business community. 

In the Sochi race, however, the main contender was opposition leader Boris Nemtsov. His challenge was aimed not only at the local administration but also directly at the Kremlin. Contrary to the expectations of most observers, myself included, the Kremlin accepted the challenge. 
 
Russia's election laws would have made it a simple matter to disqualify any undesirable candidate by citing a technical violation of the registration procedure. This is not difficult to pull off when the authorities control the electoral commission, law enforcement agencies and the courts. This means that the top Kremlin leaders approved of Nemtsov's candidacy, particularly when you consider that the Sochi Olympic Games are Prime Minister Vladimir Putin's precious pet project. 
 
A couple of weeks ago, candidates began dropping out of the race one by one. Some pulled out by their own accord and others, like wealthy businessman Alexander Lebedev, were disqualified by the election committee. It seemed that the ground was being prepared for Nemtsov's removal as well. 
 
But Nemtsov never got the ax. Instead, the authorities initiated an informational blockade against Nemtsov, denying him the opportunity to meet voters in the venues of his choice and preventing him from advertising in the media while coverage of acting Mayor Anatoly Pakhomov dominated local television and newspapers. Pakhomov was portrayed less as a candidate and more as a successful, tireless leader, not unlike the way Dmitry Medvedev was portrayed during the presidential election campaign a year ago. 
 
The election was preceded by an intriguing series of liberal gestures from the Kremlin, including Medvedev's interview with the editor-in-chief of Novaya Gazeta, his meeting with human rights advocates in the Kremlin and the early release of former Yukos lawyer Svetlana Bakhmina from jail. 
 
The Sochi election has become the focus of both national and international attention. Without a doubt, it is the most prominent election since the presidential vote in 2008. 
 
In the end, the Sochi vote will be indicative of where the Kremlin goes from here. On one hand, it wants to demonstrate a more liberal approach to domestic politics, and on the other hand, it wants to emphasize how much it controls by showing how easily its candidate can win against the most powerful challenger that the opposition has to offer. 
 
The Kremlin's favored candidate was victorious despite the strong protest vote. The economic crisis and noisy conflicts between the administration and residents over the government's heavy-handed, often illegal methods used to push through Olympic projects surely played a role in the election, but what is important is that on election day there were more voters who supported the Kremlin's polices toward Sochi than those who opposed them. 
 
Lessons learned from the Sochi election will be useful to both the Kremlin and the opposition during the next round of elections in autumn. By that time, the mood of social protest in the regions will have reached the high temperatures we are now seeing in Sochi.
 
This comment first appeared in The Moscow Times