During the war, initially the Kingdom of Romania was neutral to the Central Powers, thus with Austria-Hungary. In August 1916 Romania entered the war on side of the Allies and attacked the Kingdom of Hungary, however it was pushed back to the frontier in October and by January 1917, two-thirds of Romania were occupied by the Central Powers. The Romanians were forced to retreat to the historical region of Moldavia, but were able to stave off complete collapse in 1917 by reorganizing their army and repulsing the Central Powers' offensive at Mărășești and Oituz. Nevertheless, after the October Revolution of 1917, Russia fell into civil war, and the Russian government signed two ceasefire agreements with the Central Powers, followed later (on December 15) by a full armistice. Lacking Russian support, the Romanian government was subsequently forced to sue for peace, concluding in December 1917 the Armistice of Focșani.