Russian President Vladimir Putin at the Saint Petersburg International Economic Forum in Saint Petersburg, Russia, on June 17, 2016. Mikhail Svetlov/Getty Images

Russian President Vladimir Putin at the Saint Petersburg International Economic Forum in Saint Petersburg, Russia, on June 17, 2016. Mikhail Svetlov/Getty Images

There is no doubt that Moscow was hoping for Britain to leave the European Union. Its propaganda channels such as RT eagerly championed the “Leave” case, and following the narrow but clear vote in the UK to leave the EU, Russian newspapers and commentators were jubilant, Mark Galeotti wrote for Vox.

It’s not so much Brexit itself that matters to the Kremlin, but rather the hope that this will generate yet more division and distraction in the West. But Vladimir Putin ought not to regard this as an undiluted win, because there are some buried risks for Russia, too.

A Europe focused on its own internal problems is one not focused on Russia’s transgressions

The Kremlin’s calculation is that the Brexit referendum will not only lead to protracted negotiations over Britain’s withdrawal but will also encourage other fragmentary pressures.

Already, populists across Europe are calling for their own referendums, from France’s Front National and the Dutch Party for Freedom on the right to the Five Stars movement in Italy on the left.

There is also a new enthusiasm for secession in Scotland by the Scottish Nationalists, who narrowly lost an independence referendum in 2014, and in Italy from the Lega Nord, which campaigns for the independence or autonomy of northern Italy from Rome.

Although there is no evidence of any meaningful Russian impact on Brexit, its propaganda machine and covert “active measures” operations are much more active and effective in continental Europe — for example, the Front National received an $11.7 million loan from a Russian bank in 2014.

Russian assets will continue to be thrown behind these various campaigns. But regardless of whether these parties and movements succeed, as long as Europe is occupied with its own internal problems, then as far as Putin is concerned, the Kremlin wins.

It’s not that Putin expects or necessarily even wants the EU to fall apart. After all, he does not harbor any imperialistic designs on Europe. What he wants is a West too disunited and inward-looking to be able meaningfully to resist Russian adventurism in its self-claimed sphere of influence.

Already, figures such as Moscow Mayor Sergei Sobyanin have suggested that Britain’s departure will lead to a relaxation of the sanctions regime imposed on Russia since it annexed Crimea and invaded southeast Ukraine.

Putin is also hoping that turmoil in Europe will infect NATO, undermining its coherence. Governments needing to shore up their domestic support or facing separatist political campaigns at home may be less committed to maintaining or increasing their defense expenditure, for example, or to deploying troops to support their allies.

Finally, a post-Brexit Britain is likely to suffer prolonged economic troubles. Desperate to attract business, London may be tempted to ignore calls for greater transparency and accountability in its financial sector.

As a result, it would become a welcome hub for Russian dirty money and dubious business deals, allowing Moscow some opportunities to bypass the effects of Western sanctions.

But there are lots of ways this could backfire on Russia

For all this, there are some grounds to suggest the outlook will not be quite so purely beneficial for Russia.

The economic impact of Brexit is already mixed. Russia made a $3.7 billion paper profit on its gold reserves in the first 24 hours after the vote, as prices rose in response to global uncertainty.

But much of Russia’s foreign exchange reserves were in sterling, which duly shrank in value by about $1.2 billion in the same period. Russian Energy Minister Alexander Novak is also worried about the risks of a serious further slump in oil prices, on which the budget depends.

Konstantin Kosachev, chair of the Russian Senate’s foreign affairs committee, has warned that “if the EU gets weighed down in its own problems, and crosses the line into crisis, then it will affect our trade relations.”

While Britain accounts for just 2.7 percent of Russia’s exports and 1.9 percent of its imports, the EU as a whole is the country’s main trading partner, accounting for about half of each. If Brexit has negative economic implications for the rest of the EU, then this will inevitably have knock-on effects on Russia, already stuck in a recession likely to last years.

The weaker the Russian economy, the harder it is to maintain the loyalty of the elites, to pacify the masses, and to keep spending on the modernized military on which Putin is relying for so much of his international clout these days.

Furthermore, if Brexit seriously weakens the EU, it might actually make Russia’s geopolitical position more challenging, not less.

In Moscow, it has become fashionable to sneer at the EU’s sluggish and hesitant foreign policy initiatives, constrained as they are by both bureaucratic inertia and a culture of consensus and conciliation. As one Russian foreign ministry staffer put it to me, “Europe just wants to make things nice for everybody.”

However, there is also a growing recognition that the EU acts as a moderating influence on some of its more aggressive and ambitious members. A particular concern is Poland, a country with a growing economy, a desire to assert a strong regional role, longstanding antagonism toward Russia, and a strong, nationalist government.

Russia’s business ombudsman Boris Titov called Brexit “not the independence of Britain from Europe, but the independence of Europe from the US.” However, while he claimed there would be a “united Eurasia” within a decade, the more immediate likelihood is that Washington will double down, not withdraw from Russia’s immediate strategic neighborhood.

If it feels that Europe is increasingly ineffective, a post-Obama White House may look more assiduously at cultivating direct regional relationships with Ukraine and in Central Asia. This would be a much more direct challenge to Moscow’s authority, forcing it to come to terms with its lack of positive support and real soft power in Eurasia.

Overall, then, Putin may still have reasons to regret what he wished for. His ideal is an EU that is distracted, divided, and weakened, but not mortally so. He may, however, find that he has traded a cozy and polite neighbor for an uncertain, volatile, and sometimes aggressive one.

By Mark Galeotti, for Vox

Mark Galeotti is a senior research fellow at the Czech Institute of International Affairs, a visiting fellow with the European Council on Foreign Relations, and the director of Mayak Intelligence.