In 1800, Colombia was part of a Spanish colony called New Granada. In 1813, Colombia declared independence from Spain but did not achieve it until 1819. In 1821, Venezuela joined Colombia to form the Republic of Greater Colombia. In 1822, Ecuador joined, reuniting New Granada under the flag of Greater Colombia. In 1830, both Venezuela and Ecuador broke free of Greater Colombia. In 1903, Panama broke away, leaving the modern country of Colombia.