Murugan marches from Kailash to the seashore at Tiruchendur, sends Veerabahu to offer peace, fights Surapadman's brothers and sons for five days and on the sixth splits the demon, hiding as a mango tree, with his lance; the two halves become his peacock and his cock banner.
Murugan comes south with the champions born from his mother's anklets, Veerabahu at their head, and camps on the shore at Tiruchendur. Veerabahu carries an offer of peace to the island city of Veeramahendram and is insulted. The war runs five days and takes the demon's brothers and sons. Murugan shows Surapadman his universal form; the demon understands and still will not yield. On the sixth day Surapadman becomes a vast mango tree in the sea; the Vel splits it and the halves rise as a peacock and a cock. Murugan forgives him, rides the one and flies the other on his banner, and Indra gives him his daughter Deivanai. The town is called Jayantipuram, the city of victory, and the fight is played on the shore every Skanda Sashti.
In Aippasi devotees stay six days at Tiruchendur and fast, one day for each day of the war. On the sixth evening Surapadman, in his changing shapes, is brought out on the sand to meet the god, and is defeated in front of the sea; the next day the wedding to Deivanai is celebrated. The temple also keeps a later sea story: in 1648 Dutch sailors carried off the Shanmukha image, threw it overboard in a storm, and it was found in the sea in 1653 by the governor Vadamalaiyappa Pillai, guided by a dream of a floating lime and a kite overhead.
Sources: Lord Muruga of Tiruchendur (ACL-CPL 00327, archive.org full text); Skanda Sashti (Wikipedia); Dutch piracy at Tiruchendur 1648 to 53 (Tiruchendur Sri Subrahmanya Swami Devasthanam)