Treaty of New York
The Treaty of New York was signed in -2499 (2019 AD) and placed the armed forces of the major nations of Terra under the centralized control of the United Nations (UN), which essentially transformed the UN into a world government with teeth, a World-State.
The Terran Confederation has its roots in the formation of the United Nations Space Coordination Agency (UNSCA) in -2508 (2010 AD), and the Treaty of New York, signed in -2499 (2019 AD). Essentially, the treaty placed the armed forces of the major nations of Terra under the centralized control of the United Nations (UN), until that time a loose organisation of the nation states of Terra, with no governmental authority.
In addition, the treaty formalized the changes that had been made in the structure of the United Nations up to that time. The Secretary General was granted a wider range of executive powers than before. The Secretariat, previously an unofficial advisory group of representatives from the major nation-states, was made the chief legislative body. The General Assembly was retained, but it was an institution without real power and served merely as a forum for debate among the representatives of both major and minor nations. The Security Council was dispensed with altogether.