Defeat in the Second World War brought about radical change in Japan. For the first and only time in its history, Japan was occupied by foreign powers, an American-led occupation which lasted for seven years. Allied occupation brought forth sweeping democratic reforms. It led to the formal end of the emperor's status as a demigod and the transformation of Japan from a form of mixed constitutional and absolute monarchy to a constitutional monarchy with a liberal democracy. In 1952, with the Treaty of San Francisco, Japan became a sovereign state again. The postwar Shōwa period was characterized by the Japanese economic miracle.