In January 1918, Romanian forces established control over Bessarabia as the Russian Army abandoned the province. Although a treaty was signed by the Romanian and Bolshevik Russian governments following talks between 5 and 9 March 1918 on the withdrawal of Romanian forces from Bessarabia within two months, on 27 March 1918 Romania formally attached Bessarabia to its territory, based on a resolution passed by the local assembly of that territory on its unification with Romania. Romania officially made peace with the Central Powers by signing the Treaty of Bucharest on 7 May 1918. Under the treaty, Romania was obliged to end the war with the Central Powers and make small territorial concessions to Austria-Hungary, ceding control of some passes in the Carpathian Mountains, and to grant oil concessions to Germany. In exchange, the Central Powers recognised the sovereignty of Romania over Bessarabia. The treaty was renounced in October 1918 by the Alexandru Marghiloman government, and Romania nominally re-entered the war on 10 November 1918. The next day, the Treaty of Bucharest was nullified by the terms of the Armistice of Compiègne. Total Romanian deaths from 1914 to 1918, military and civilian, within contemporary borders, were estimated at 748,000.
Question: who agreed to end the war?
Answer: Romania; the Central Powers; Romania