Santafé became the seat of the government of the Spanish Royal Audiencia of the New Kingdom of Granada (created in 1550), and then after 1717 it was the capital of the Viceroyalty of New Granada. After the Battle of Boyacá on 7 August 1819, Bogotá became the capital of the independent nation of Gran Colombia. It was Simón Bolívar who rebaptized the city with the name of Bogotá, as a way of honoring the Muisca people and as an emancipation act towards the Spanish crown. Hence, since the Viceroyalty of New Granada's independence from the Spanish Empire and during the formation of present-day Colombia, Bogotá has remained the capital of this territory.