MOSCOW  Dmitri A. Medvedev, the Kremlin insider and unprepossessing lawyer who had never held elected office before, was sworn in as Russia’s president on Wednesday inside the Grand Kremlin Palace.

The ceremony, mixing czarist splendor with renewed Russian confidence, marked the passing of formal power from the departing president, Vladimir V. Putin, to his untested protégé.

But the events also served as a tribute to the enduring stature and popularity of Mr. Putin, whom Mr. Medvedev nominated as prime minister within hours of taking office.

Mr. Putin, a former intelligence service chief who had presided over Russia’s economic revival while consolidating power, rolling back civil liberties and leading a government plagued by corruption, arrived at the ceremony alone and before Mr. Medvedev.