In 1598 it became the capital of a Spanish general captaincy, and in 1739 it became the capital of New Granada, which was ruled by a viceroy.
З 1598 года Багата была сталіцай іспанскага генерал-капітанства, а з 1739 года — віцэ-каралеўства Новая Гранада.