Seeking to gain independence from both empires, the peoples of the southern Caucasus had declared the Transcaucasian Democratic Federative Republic in 1918 and started peace talks with the Ottomans.[10][11] Internal disagreements led to Georgia leaving the federation in May 1918, followed shortly thereafter by Armenia and Azerbaijan. With the Ottomans having invaded the Caucasus and quickly gained ground, the three new republics were compelled to sign the Treaty of Batum on 4 June 1918, by which they recognised the pre-1878 border.[12][13] Armenia in particular was reeling from the aftermath of the Ottoman-led Armenian Genocide, which resulted in vast numbers of refugees fleeing Western Armenia.[14][15]