The coup brought to Brazil a military regime politically aligned to the interests of the United States government. This regime lasted until 1985, when Neves was indirectly elected the first civilian president of Brazil since the 1960 elections. Jânio Quadros resigned on August 25, 1961. At the time of his resignation, João Goulart was in the People's Republic of China on a foreign relations trip. On August 29, the Brazilian Congress heard and vetoed a motion to stop Goulart from being named the president, brought by the heads of the three branches of the military and some politicians, who claimed Goulart's inauguration would put the country "on the road to civil war." A compromise was reached. Brazil would become a parliamentary democracy, with Goulart as president. As such, he would be head of state, but with limited powers of head of government. Tancredo Neves was named as the new prime minister. On January 6, 1963, Goulart successfully changed the system of government back to a presidential democracy in a referendum in which he won by a large margin. Goulart found himself back in power with a rapidly deteriorating political and economic situation. During this period, Goulart was politically isolated, with a foreign policy which was independent of any alignment. He openly criticized the Bay of Pigs invasion by the US, but criticized the Cuban regime of Fidel Castro during the Cuban Missile Crisis. The country's economic situation deteriorated rapidly. Attempts to stabilize the currency were financed by aid packages from the International Monetary Fund. His failure to secure foreign investment and curb domestic inflation put the country in a difficult situation which exacerbated social conflicts. On March 13, 1964, Goulart gave a speech where he promised to nationalize the country's oil refineries, as well as carry out "basic reforms" including rent control. This was followed by a large demonstration on March 19, where a conservative group marched on Praça da Sé, São Paulo, in a demonstration called "March of the Family with God for Freedom" against Goulart and his policies. The friction between the military and Goulart boiled over with his intervention in a revolt by sailors of the Brazilian Navy led by José Anselmo dos Santos, historically known as Cabo Anselmo, and later exposed as an agent provocateur. On March 25, 1964, nearly 2,000 sailors assembled in Rio de Janeiro, petitioning for better living conditions and pledging their support for Goulart's reforms. The Minister of the Navy, Sílvio Mota, ordered the arrest of the sailors leading the assembly.