Historically in 1427, James I visited Inverness with the intention of establishing law and order within the chaotic northern realm. The most powerful Highland chiefs were summoned to parliament, and when they reached Inverness Castle they were apprehended and imprisoned; several of the mightiest were condemned to death and executed, others were eventually released. According to historian Alexander Mackenzie, the young Mackenzie chief, Alexander of Kintail, was one of those so-released, and was sent by the king to school far south in Perth (then known as Saint Johnstoun), which was at that time the location of the principal literary seminary in the kingdom, and was frequently the seat of court.