Minor advances into Transylvania were met with a Central Powers counter-offensive that swept through Oltenia and Wallachia, occupied Bucharest, and forced all governmental structures to take refuge in Iaşi. While Moldavia remained the only region under Romanian administration and the country increased its reliance on Imperial Russia - and then on the Russian Provisional Government, the Romanian Army was able to block further Central Powers' offensives in the battles of Mărășești, Mărăști, and Oituz. This situation was ended by the October Revolution in Russia and the Treaty of Brest-Litovsk between the Bolshevik government and the Central Powers: Romania saw itself without reinforcements, agreed to an armistice, and then signed the Treaty of Bucharest in May 1918.