It was the successor of the first Hungarian People's Republic and lasted from only 21 March to 1 August 1919. Though the de jure leader of the Hungarian Soviet Republic was president Sándor Garbai, the de facto power was in the hands of foreign minister Béla Kun, who maintained direct contact with Lenin via radiotelegraph. It was Lenin who gave the direct orders and advice to Béla Kun via constant radio communication with the Kremlin. It was the second socialist state in the world to be formed, preceded by only the October Revolution in Russia which brought the Bolsheviks to power. The Hungarian Republic of Councils had military conflicts with the Kingdom of Romania, the Kingdom of Serbs, Croats and Slovenes and the evolving Czechoslovakia. It ended on 1 August 1919 when Hungarians sent representatives to negotiate their surrender to the Romanian forces. Due to the mistranslation, it is often referred to as "Hungarian Soviet republic" in English sources, despite the literal name "Republic of Councils in Hungary" was chosen for the purpose to avoid any strong ethnic connotation with Hungarian people, and express the Proletarian internationalist doctrine of the new Communist regime.