The subsequent war with Spain, named the Restoration War, consisted mainly of periodic skirmishes near the border and five significant battles, being the Battle of Montijo on 26 May 1644, the Battle of the Lines of Elvas on 14 January 1659, the Battle of Ameixial on 8 June 1663, the Battle of Castelo Rodrigo 7 July 1664, and the Battle of Montes Claros 17 June 1665; the Portuguese were victorious in all of these battles.