Marthanda Varma defeated the Dutch (VOC) forces at the Battle of Colachel in 1741. He then adopted a European mode of discipline for his army and expanded his kingdom northward (to what became the modern state of Travancore). He built a sizeable standing army of about 50,000 men, as part of designing an "elaborate and well-organised" war machine, with the role of the Nair nobility (on which kings of Kerala had earlier been dependent for battles), and fortified the northern boundary of his kingdom (Travancore Lines). His alliance in 1757 with the ruler of Kochi (Cochin), against the northern Kingdom of Calicut, enabled the kingdom of Kochi to survive.