	Edward I gave wide-reaching powers to the sheriff of Yorkshire for enforcing law and order in the city of York, and the sheriffs established their headquarters in Clifford's Tower. During the wars against the Scots under both Edward and his son, York Castle also formed the centre of royal administration in England for almost half the years between 1298 and 1338. Many Westminster institutions followed the king north to York, basing themselves in the castle compound. The existing castle buildings were insufficient to house all the administrative institutions; a temporary building inside the castle was built for the Court of Common Pleas at the beginning of the period, and rebuilt on a larger scale during 1319–20. The Exchequer took over Clifford's Tower. Other buildings around the city had to be commandeered to absorb the overflow from the castle itself. As a result of the extended use of the castle for these purposes, the law courts at York Castle began to compete with those in London, a pattern that lasted into the 1360s. The castle eventually acquired its own mint in 1344, when Edward III decided to create a permanent mint in York Castle to produce gold and silver coins to serve the needs of the north of England. European coiners were brought to York to establish the facility.