Cupar is a town, former royal burgh and also church in Fife, Scotland. It lies between Dundee as well as Glenrothes. According to a 2011 population price quote, Cupar had a population around 9,000, making it the nine biggest negotiation in Fife, and the civil parish a population of 11,183 (in 2011). It is the historic county town of Fife, although the council currently sits at Glenrothes. The community is believed to have expanded around the site of Cupar Castle, which was the seat of the constable as well as was had by the earls of Fife. The area came to be a centre for judiciary as the county of Fife and as a market town providing for both cattle as well as sheep. In the direction of the latter stages of the 13th century, the burgh ended up being the site of a setting up of the 3 estates - clergy, nobility as well as burgesses - organised by Alexander III in 1276 as a predecessor of the Parliament of Scotland. Although written info of a charter for the contemporary town was lost, proof suggested that this existed as one of the many properties owned by the Earls of Fife by 1294. Throughout the center of the 14th century, the burgh started to pay customizeds on gross incomes, which probably indicated that royal burgh status was provided sometime in between 1294 and 1328. The oldest document, describing the royal burgh, was a give by Robert II in 1381 to provide a port at Guardbridge on the River Eden to assist improve trade with Flanders. This grant was formally recognised by James II in 1428.