In 1828 a war broke out with Peru and the Gran Colombian Army was called upon to defend the nation's sovereignty. The war lasted into 1829 with a Peruvian naval victory, but the Colombians were victorious on land with the crushing of the Peruvian invasion force at the Battle of Tarqui. The war ended in a stalemate.