In 1941, Yugoslavia was invaded and partitioned by the Axis Powers, and its northern parts, including Subotica, were annexed by Hungary. The annexation was not considered legitimate by the international community and the city was de jure still part of Yugoslavia. The Yugoslav government in exile received formal recognition of legitimacy as the representative of the country. On 11 April 1941, the Hungarian troops arrived in Subotica on the grounds that the majority of the people living in the city were ethnic Hungarians, which had been part of the Kingdom of Hungary for over 600 years. During World War II, the city lost approximately 7,000 of its citizens, mostly Serbs, Hungarians and Jews. Before the war about 6,000 Jews had lived in Subotica; many of these were deported from the city during the Holocaust, mostly to Auschwitz. In April 1944, a ghetto was set up. In addition, many communists were put to death during Axis rule. In 1944, the Axis forces left the city, and Subotica became part of the new Yugoslavia. During the 1944–45 period, about 8,000 citizens (mainly Hungarians) were killed by Partisans while re-taking the city as a retribution for supporting Axis Hungary.