Beginning a process from which Argentina was to emerge as successor state to the Viceroyalty , the 1810 May Revolution replaced the viceroy Baltasar Hidalgo de Cisneros with the First Junta , a new government in Buenos Aires composed by locals .