The ILO became a specialized agency of the United Nations in 1946 through a special agreement. This relationship was established shortly after both organizations were formed - the UN in 1945 and the ILO having existed since 1919 under the Treaty of Versailles.