Shortly thereafter, Ebert appeared in the Reichskanzlei and demanded that the government be handed over to him and the SPD, as that was the only way to keep up law and order. In an unconstitutional move, Max resigned and appointed Ebert as his successor. On the same day, Philipp Scheidemann spontaneously proclaimed Germany a republic in order to placate the masses and prevent a socialist revolution. When Maximilian later visited Ebert to say goodbye before leaving Berlin, Ebert – who urgently wanted to keep up the old order, improving it through parliamentary rule, and head a legitimate, not a revolutionary government – asked him to stay on as regent ("Reichsverweser"). Maximilian refused and, turning his back on politics for good, departed for Baden.