MOSCOW — Russian President Vladimir Putin shook hands with just three people in the audience after he took the oath of office on Monday. They were the head of the Russian Orthodox Church, Patriarch Kirill; Putin’s longtime prime minister, Dmitry Medvedev; and former German chancellor Gerhard Schröder.

It was a remarkable and revealing moment. At Russia’s biggest political event of the year, just two days before the country celebrates the Soviet World War II victory over the Nazis, a front-row spot of the utmost honor was granted to a former German leader.

After being sworn in for another six years as Russia’s president May 7, Vladimir Putin said it was his duty to ensure the country’s “present and future.”

Schröder’s placement, captured repeatedly by state TV cameras and broadcast on the evening news, showed the depth of the ties between Putin and his perhaps most important foreign friend. It served as a reminder that the former East Germany-based KGB officer who now rules Russia continues to look to Berlin as his key bridge to Europe. And it looked to be an effort to show Russians — and the West — that the Kremlin still has allies abroad despite sanctions and criticism.

“This was a signal that those who take a positive position in relation to the Kremlin will be supported by it,” said Alexey Chesnakov, a former Kremlin adviser turned pro-Putin commentator.

Schröder took office in 1998, just over a year before Putin, and soon bonded with him at international summits, where the Russian president was often the only other world leader who also spoke German. After losing his reelection bid in 2005, Schröder shrugged off criticism to go to work for Nord Stream, the gas pipeline project linking Russia to Germany. In the fall, Schröder doubled down and became chairman of Russia’s biggest oil producer, Rosneft.

Among other things, Schröder has been lobbying for Nord Stream 2, a new pipeline that critics say will boost Moscow’s ability to use its energy supply for political leverage in Europe.

Putin has long been intent on building closer ties to Germany, and analysts say he was shocked when Chancellor Angela Merkel pushed for European Union sanctions against Russia amid the Ukraine crisis in 2014. Another close Putin friend from Germany stood behind Schröder at Monday’s inauguration: banker Matthias Warnig, a former East German secret police agent who, like Putin, worked in Dresden in the twilight of the Cold War.

Both men also attended Putin’s 2012 inauguration, but video footage of the event shows that Schröder didn’t have a prime front-row spot next to the patriarch.

The Germans’ placement on Monday provoked a torrent of criticism. In Russia, opposition leader Alexei Navalny said it showed the meaninglessness of the Kremlin’s “talk of ‘greatness and independence from the West.’ ” In Berlin, the conservative Welt newspaper said Schröder’s “depressing” appearance showed he had left “his moral compass in the Kremlin cloakroom.” Schröder's visit came as Western governments, including Germany's, have been criticizing Russia over the arrest of more than 1,600 protesters who participated in anti-Putin rallies Saturday.

Schröder’s office didn’t respond to a request for comment. A spokesman for Merkel, who has taken a tougher line on Russia but has allowed the Nord Stream 2 project to proceed, declined to comment on Schröder’s appearance. A German official close to Merkel, however, wrote in a text message: “I’m quite sure that this is not the path that Merkel will take after her tenure.”