irvine was granted its first burgh charter around 1249. this entitled the town to organise its own affairs under a town council. in circa 1372 a dispute arose between irvine and ayr as to which of the two burghs had rights to control trade in the barony of cunninghame and barony of largs. the burgesses of irvine were able to produce royal charters showing that the town had the right to control trade in the baronies of cunninghame and largs. the dispute was resolved by robert ii's royal charter of 8 april 1372 conferring royal burgh status.