 King John I of Scotland inherited the lordship of Irvine sometime in the mid-13th century.Robert the Bruce, in an attempt to seize John's lands, made sure that he secured the town.From Bruce it passed to his grandson Robert the Steward, future King Robert II of Scotland.