Cupar is a community, former royal burgh and also church in Fife, Scotland. It exists between Dundee and also Glenrothes. According to a 2011 population quote, Cupar had a population around 9,000, making it the ninth biggest negotiation in Fife, and the civil church a population of 11,183 (in 2011). It is the historical county town of Fife, although the council now rests at Glenrothes. The town is thought to have grown around the site of Cupar Castle, which was the seat of the constable as well as was possessed by the earls of Fife. The area came to be a centre for judiciary as the county of Fife and also as a market town catering for both livestock and also sheep. Towards the latter stages of the 13th century, the burgh became the site of an assembly of the 3 estates - clergy, nobility and citizens - arranged by Alexander III in 1276 as a predecessor of the Parliament of Scotland. Although composed details of a charter for the contemporary town was shed, evidence recommended that this existed as one of the many residential or commercial properties possessed by the Earls of Fife by 1294. Throughout the middle of the 14th century, the burgh started to pay custom-mades on gross incomes, which possibly meant that royal burgh condition was given at some point between 1294 as well as 1328. The earliest record, describing the royal burgh, was a give by Robert II in 1381 to offer a port at Guardbridge on the River Eden to help boost trade with Flanders. This grant was officially recognised by James II in 1428.