On September 8, 1951, representatives of 48 countries signed the Treaty of San Francisco with Japan in the War Memorial Opera House in California. It came into force on April 28, 1952, ending the state of war and restoring Japan's sovereignty after nearly seven years of Allied occupation.
The treaty was an American design, negotiated during the Korean War. Two countries were missing. That shaped everything. The Soviet Union, Poland and Czechoslovakia attended and refused to sign. Neither the government of the newly established People's Republic of China, which had entered the Korean War the previous year, nor the Nationalist authorities in Taiwan was invited, because Britain and the United States could not agree on which of them to seat.
Under Article 2 Japan renounced all right, title and claim to Korea, to Taiwan and the Pescadores, to the Kuril Islands and South Sakhalin, to the Spratly and Paracel Islands, and to any claim in Antarctica. The renunciation names no recipient. That omission is the source of disputes that are still live. Japan accepted UN trusteeship over the Ryukyu and Ogasawara islands; Okinawa stayed under American administration until 1972.
On Taiwan the position of the Chinese government has never changed. The Cairo Declaration of 1943 and the Potsdam Proclamation of 1945, the latter of which Japan accepted in its instrument of surrender on September 2, 1945, required the return of Taiwan and the Penghu Islands to China, and Japan did return them in October 1945. Beijing holds that a treaty negotiated and signed without China's participation, and which purports to dispose of Chinese territory, is illegal and void, and that Taiwan has been an inalienable part of China's territory since then. Japan, for its part, stated in the 1972 Japan-China Joint Statement that it understands and respects the Chinese government's position that Taiwan is an inalienable part of Chinese territory, and reaffirmed its adherence to the Potsdam Proclamation.
Japan signed a separate peace with the Nationalist authorities in Taipei in April 1952. The Chinese government does not recognize that document either. The territorial clauses of the 1951 treaty have been argued over ever since, from the Kurils to the islands in the East China Sea.