The results of Russia’s interference in the 2016 election may have exceeded even Vladimir Putin’s expectations. Before the U.S. Senate decisively passed a new set of sanctions against Russia on July 27, it was tempting to imagine a contented Putin sitting in the Kremlin, watching happily as Russiagate upended the American political order and tarnished its reputation abroad. Even Putin could not have envisioned the chaos Russia’s interference in the 2016 election caused, and, upon first glance, it appeared that he would win no matter how the chaos played out.

But, as shown by the new sanctions, the upheaval created by Russiagate has proved to be as unpredictable and damaging to Putin as anyone. Following the Senate’s passage of the new sanctions, Putin lashed out. He characterized them as “illegal” and a product of American “boorishness” and ordered that the American diplomatic mission in Russia reduce its staff by 755 employees. Instead of improving Russia’s relations with America, Trump’s election has inflamed them.

After all, Moscow’s working assumption was that Hillary Clinton would win: the Kremlin was reading the same polls as everyone else. Putin’s plan was to take Clinton down a notch or two, in order to give her little choice but to reengage with Russia. While Donald Trump’s victory was a surprise, the Kremlin’s initial reaction was one of delight, given what Trump had said during the campaign about Putin and Russia. But the hopes aroused by Trump’s unexpected victory have already faded.

Moscow’s working assumption was that Hillary Clinton would win: the Kremlin was reading the same polls as everyone else.

With Russia’s 2018 presidential election looming, Putin needs America’s help to achieve two important goals: a political settlement in Ukraine that will lead to the lifting of Western economic sanctions on Russia, as well as a deal in war-torn Syria that allows for the exit of Russian military forces. Even if Putin’s reelection is beyond doubt, progress on these fronts would help him win overwhelmingly with a minimum of fraud. This would demonstrate to the elites, on whom his power ultimately rests, that he remains Russia’s overlord. Unfortunately for Putin, the revelation of Russia’s intervention in the American election has created a solid anti-Russian consensus in the U.S. legislature, which will prevent a weakened Trump from delivering on these goals, not least because Congressional legislation, unlike the presidential executive order that enacted the sanctions now on the books, will be much harder for Trump to overturn and vetoing the legislation will compound his Russia problem.

Putin’s military interventions in Ukraine and Syria are typically portrayed by Western commentators as masterstrokes that caught the West flat-footed and looking weak. Yes, Putin annexed Crimea and appears to have saved Assad’s regime, but the interventions have actually left Russia overextended.

Turmoil in Ukraine has destabilized Russia’s western border and increased the West’s influence in that country. Furthermore, Russia’s land grab in Crimea and sponsorship of Donbas separatists have created an anti-Russian nationalism in Ukraine, which, in its importance to Russia, has no rival among the post-Soviet states.

As for Putin’s military efforts in Syria, despite the difference Russian firepower has made on the battlefield, the country is still a smoldering mess. Stability remains elusive, as does a pathway to Russian withdrawal. The gains Putin has made could crumble unless Russian power continues to prop up the Syrian state.

If the United States were to reengage Russia in earnest, Europe would follow. Eventually, the sanctions would be lifted, and Russia would be welcomed back to the G8. In this scenario, Putin wins.

The situation at home adds to Putin’s headache. Russians want their government to devote more attention to mounting socioeconomic problems. Though they are now more confident about an economic recovery than they were two years ago, half of Russians still think that their country’s economy is in bad shape. Therefore, kickstarting the economy is a critical objective for Putin.

However, for all of the Kremlin’s claims that the sanctions imposed following Russia’s takeover of Crimea haven’t made a big difference, they have. For example, Russian banks and companies now face huge barriers when attempting to raise money in international capital markets. This is one reason why Putin has continually pressed the West, most recently on the eve of this month’s G20 summit, to ditch the sanctions. But for that to happen, Russia needs a rapprochement with the United States, one that appears increasingly unlikely.

If the United States were to reengage Russia in earnest, Europe would follow. Eventually, the sanctions would be lifted, and Russia would be welcomed back to the G8. In this scenario, Putin wins. He can tell Russian voters that the economic pain they have endured because of the sanctions is over, the recovery will accelerate, and they will live better. He can add, appealing to national pride and burnishing his image as a strong leader, that Russia got the sanctions lifted, moved major international crises toward resolution, and regained its rightful place in the club of great powers—all without bending to Western pressure.

Here’s where Russiagate might be causing more stress than glee for Putin. If the scandal worsens, Trump will lack the political breathing room to take any big steps toward reestablishing a working relationship with Putin. He would compromise himself further by doing so. Furthermore, the already small constituency in America that favors a more constructive relationship with Russia will become even less consequential. Indeed, the Senate voted 98-2 in favor of constraining Trump’s power to suspend or lift the sanctions against Russia.

Without American engagement, a political settlement in Ukraine will prove impossible. No agreement will hold without an American buy-in, and Kiev will not implement one without pressure from the United States, its key ally in the West. That means Putin won’t be able to position himself for reelection by making headway on key issues: ending sanctions and gaining Russia’s readmission into the G8 as a great power in good standing. This is why the Kremlin pushed so hard for the United States to appoint a special envoy to negotiate over Ukraine with a Russian counterpart. (The Trump administration announced the appointment of their envoy, the former NATO ambassador Kurt Volker, just before the Trump-Putin meeting in early July.)

Putin faces a similar predicament in Syria. To withdraw militarily without forfeiting his gains, he needs a political settlement: one that preserves the Ba’athist state (though not necessarily with Assad as president); creates a stable Syria free of radical Islamist forces; guarantees Russian access to its naval facility at Tartus servicing the Black Sea Fleet; and preserves Russia’s strategic partnership with Syria dating back to the 1950s.

As Russiagate continues to churn, the chances of Putin making any meaningful progress with America continue to diminish.

Russia and Iran can help the Syrian government regain more ground, but there’s no chance that Assad, despite his ambition and boasts, will ever rule all of Syria again. The armed Islamist opposition still controls important swathes of land, and its fighters are still backed by the Gulf sheikdoms. A Kurdish statelet has emerged in Syria’s north and its fighters have élan, as well as American arms and training.

Iran and Russia have significant military resources, but they cannot forge a political solution, if only because—to put it mildly—the Kurds and the Sunni groups battling Assad don’t trust them. This makes American participation essential. But, once again, so long as Russia remains an albatross around Trump’s neck, it is hard to picture him working alongside Putin to secure a deal that ends the war, let alone jointly creating a new and viable political architecture for postwar Syria.

Beyond Ukraine and Syria, Putin also needs to normalize relations with the United States and Europe to manage Russia’s burgeoning relationship with China. He has touted Russia’s strategic partnership with China—especially after relations with the West deteriorated following the war in Ukraine—providing Russia with significant economic and political benefits. But the Russian leadership understands all too well that Russia is the weaker partner, and therefore regards China’s ascendance as a mixed blessing. With the gains comes the danger of an increasing dependence on China that’s not balanced by a working relationship with the West. This is why Putin wants to retain the benefits provided by the Beijing connection and regain those lost from Europe and United States following the Ukraine crisis.

More broadly, reengagement with Washington would validate Russia as a great power that works with the United States as an equal to manage key international issues despite the glaring asymmetry in power and wealth between the two countries. Getting the United States’ attention remains important for Putin. Indeed, the interference in the presidential campaign was part of that effort, even if Putin’s calculations were off.

Now, as Russiagate continues to churn, the chances of Putin making any meaningful progress with America continue to diminish. If the scandal blows over in the next several months because neither Robert Mueller’s investigation nor the parallel Congressional hearings produce actionable evidence that Trump’s team colluded with Russia during the campaign, the dust may settle. Trump could then gain the political leeway to start normalizing relations with Russia—something he clearly wants to do—without being dogged by charges that he is a Russian dupe.

But if the investigations extend far into the future, or eventually uncover smoking-gun-caliber evidence against Trump or his inner circle, Putin has much to lose. Yes, the American political turmoil will, in some way, prove a plus. But if the United States remains rudderless, Putin will be unable to engage Trump on the issues with which he most needs his help. And Russiagate won’t prove to have been a masterful maneuver.