The town was established as a Royal Burgh in 1205, serving as Ayrshire's central marketplace and harbour throughout the Medieval Period[4] and remaining a well-renowned port across the Early Modern Period.[5] On the southern bank of the River Ayr sits the ramparts of a Citadel constructed by Oliver Cromwell during the mid-17th Century. Towards the south of the town is the birthplace of Scottish poet Robert Burns in the suburb of Alloway. With the expansion of the railway during the 19th Century Ayr soon developed into a seaside resort. This remains the case today with tourism occupying a significant sect of the local economy in Ayr through the opening of a Butlin's holiday park on the southern headlands of the town and through the continued presence of the Gaiety Theatre, which ran various shows across the late 20th century attracting performers from across the United Kingdom.

The name Ayr can be traced back to a pre-Celtic word meaning "watercourse". The name was used before the establishment of the Julian calendar as a name for the River Ayr.[6] Ayr was founded as a market burgh town in 1205 by King William the Lion. It was formerly named 'Inverair' or 'Inverayr', meaning "mouth of the river Ayr", yet this was later abbreviated to 'Ayr'. Elements of the former name remain present within the Scottish Gaelic name for Ayr – Inbhir Air.

Since 1261 annual fairs were held in the town. At this time the town had a recorded population of 1,500 and served as a major port on the west coast. The town was occupied by England from 1301 until 1312 as part of the Scottish Wars of Independence.[7]

On 26 April 1315, a Parliament of Scotland was held in Ayr by Robert The Bruce at St. John's Tower by the sea. Later, in 1652, the town was used as a base and fortress for some of Oliver Cromwell's men. Cromwell established a large fortress along the mouth of the River Ayr and erected walls around the area just south of the River's mouth - most of these walls remain present to this day.[8] St John's Tower, which sat around the centre of the fortress, was originally part of a large church yet this was knocked down during the construction of the fort with the tower being used for military practice; it is now protected by "Friends Of Saint Johns Tower" (FROST) residents in the "Ayr Fort Area" which sits atop the former site of the citadel. A permanent military presence was established in the town with the completion of Ayr Barracks (later known as Churchill Barracks) on the citadel site in 1795.[9]

The Central Ayrshire constituency runs north of the Ayr, Carrick and Cumnock constituency. It takes in the towns of Irvine, Kilwinning, Prestwick, Troon and rural Kyle, running into Annbank. It also incorporates the Woodfield area of Newton-on-Ayr and is represented by SNP MP Philippa Whitford.

In previous elections Ayr was represented in Westminster as part of the Ayr Parliamentary constituency, the boundaries of which included elements of Prestwick, Troon and rural South Ayrshire. The seat was abolished in 2005 to be replaced by the Ayr, Carrick and Cumnock and Central Ayrshire constituencies which were subsequently represented by MP's belonging to Labour, and later, the SNP. From the seat's creation in 1950 until the 1997 general election Ayr was continually represented by MP's from the Conservative Party. George Younger served as Member of Parliament for the constituency for most of this period - serving as MP for Ayr from 1964 to 1992.[10] In 1997 the boundaries of the constituency were altered in a move which saw the Conservative areas of Alloway, Doonfoot and Masonhill alongside parts of Kincaidston and Forehill being transferred to the neighbouring Carrick, Cumnock and Doon Valley constituency, benefiting the Labour Party.

Prior to this Ayr formed part of the Ayr Burghs constituency which combined various towns along the Ayrshire coast such as Irvine, Troon, Prestwick, Ardrossan and Saltcoats: this seat was held by the Conservatives from 1906 until the constituency's abolishment in 1950, making Ayr the longest seat to be held by the Conservatives in Scotland at over 100 years.

As a former Royal Burgh, Ayr had a Provost as chief magistrate of the burgh council and the earliest recorded provost is Nicholas de Fynvyk. The title of provost was retained by Kyle and Carrick District Council and South Ayrshire Council for their civic heads.[14] The role of provost is now apolitical and carries a number of duties including chairing meetings of the council, acting as civic head representing South Ayrshire Council, promotion of South Ayrshire Council and networking with various organisations such as local businesses.[15]

A chain and robes are worn by the provost while undertaking their ceremonial duties. The provost's chain was donated in June 1897 by James McLennan who was a Glasgow wine and spirit merchant who was born in Coylton and lived in Ayr. The official provost's robes have been provided by the council since 11 June 1923. In addition, South Ayrshire Council erects lamp posts with the Royal Burgh Coat of Arms emblazoned on the diffusers outside the official resident of the provost - this has been undertaken since 1854.[14]

Each newly elected provost enters their name into a Bible at the "Kirkin ‘O The Council" service at Ayr Auld Kirk after each council election. The Bible in which the names are entered was acquired by the Kirk during the Provostship of Hugh Miller (1841–1855).[14] The names of the provosts entered into the Bible are as follows:

Ayr is a coastal town which lies on the mouth of the River Ayr. The river then flows out into the larger Firth of Clyde estuary. From the coast the Isle of Arran can be seen, and on a very clear day, the northern tip of Northern Ireland. It is within the region of Strathclyde. Much of the land in and around this area is very flat and low lying, used for rearing dairy cattle. Towards the south of Ayr however the land is higher than most areas in the county of Ayrshire, an example of this being the Brown Carrick Hill which is situated due south of Doonfoot. Ayr lies approximately 35 miles (55 km) southwest of Glasgow.

The area experiences very cool summers and somewhat mild winters. The air is cooler during the summer due to its proximity to the sea as water has a major cooling effect on summer temperatures. During the winter months the reverse happens and the sea air has a major warming effect on the climate. The area rarely ever sees extremes due to the effects of sea air. Rainfall is generally plentiful throughout the year due to Atlantic weather systems sweeping in from the west. Compared with the rest of Scotland, the area rarely sees much mist and fog. This is because the land is relatively flat and low lying and with the wind blowing across the flatter land, this generally hinders fog from developing widely. This has made Glasgow Prestwick International Airport particularly well known as one of the less fog-prone airports in Scotland. Snowfall is rare in this part of Scotland because of the mild sea air.[18]

Ayr's industry has flourished over the years mainly because of the River Ayr. Ships that were built on the mouth of the River Ayr in the eighteenth century improved Ayr's economy. From 1883 to 1901, 143 ships and barges were built on the Ayr by Samuel B Knight and the Ailsa Shipbuilding Company. Repair work on the Ayr ceased in 1960 when Ailsa moved its operations to Troon.

The north side of Ayr Harbour still operates as a commercial port today, mainly exporting coal, and extensive railway sidings still lead down from the main railway line near Newton-on-Ayr station.

Manufacturing of textiles such as carpets and lining was important to Ayr's economy until the factories closed in the 1970s. This caused mass unemployment in Ayr. Many of the old factories are still standing and can be seen on McCalls Avenue and Walker Road in Lochside, North Ayr, though many are derelict and unsafe. There was a large factory engaged in the production of fertilisers and other agricultural products. This has since closed, but parts of the old complex are sublet by local businesses.

Ayr's High Street

Ayr has developed as the central retail hub in the south of Scotland after the opening of the town's first department store, Hourstons, in 1896. In the 1970s the opening of stores such as Marks and Spencers and Ayr's first shopping centre, the Kyle Centre (1988), encouraged an expansion in the local economy. Heathfield Retail park, an out-of-town retail park, opened in 1993 with shops such as Halfords and Homebase. Ayr Central Shopping Centre opened in March 2006, housing shops such as Debenhams and H&M and underparking for 500 cars. In December 2014 Threesixty Architecture received planning permission to refurbish the Kyle Centre by reinventing it as a centre of leisure through the creation of a new cinema complex among other new features.[19] As of 2014 Royal Society for Public Health found Ayr's High Street to be the second healthiest in the United Kingdom behind Shrewsbury.[20] In 2016 research conducted by the Local Data Company suggested that Ayr had among the highest number of shops per head in the United Kingdom at one shop for every 270 people.[21]

During the 19th and 20th centuries Ayr became a popular holiday resort. This was due to its fine sandy beach and its popularity was increased by the building of the rail link to Glasgow in 1840.[22]

Although the town does not have any ferry services from its harbour, it is in close proximity to ferry services to Northern Ireland. Troon, 5 miles (8 km) north of Ayr, has a seasonal service to Larne onboard P&O. Regular rail services to Troon and Barassie operate every 30 minutes from Ayr railway station. Cairnryan, 60 miles (100 km) south of Ayr, has up to eight daily departures to Belfast.

At the United Kingdom Census 2001, Ayr had a population of 46,431, a fall of -3.2% on 1991.[25] Mid-2008 population estimates placed the total resident population at 46,070 making Ayr the 12th largest urban area in Scotland.[26] The 2011 census has shown that Ayr’s population has grown by around 0.9% since the 2001 census - this surpassed the population growth of Ayr and Prestwick which only grew by 0.63% which fell short of the national population growth of Scotland of 4.61%.

In 2001 nearly 0.36% (167) people in the town could speak Scottish Gaelic - this fell to 0.34% (161) in 2011. South Ayrshire Council provides no educational support for the language.[27]

Prestwick Academy is located within the neighbouring town of Prestwick and provides education to pupils who are resident within Ayr but fall within its catchment area.[33] Mainholm Academy was a former secondary school located within Ayr and was closed due to safety concerns.[34]

Ayr is home to The Gaiety Theatre. Built in 1902, reconstructed after a fire in 1904, its façade remodeled in 1935, and further reinstated after a fire in 1955. In 1995, an annex was constructed, including a new café, box office, dressing rooms and studio space. After a faltering start, which saw several years as a cinema after WWI, the theatre was bought by Ben Popplewell, from Bradford who already had a track record of success running the Pavilion theatre on Ayr seafront. For fifty years the Popplewell family ran the theatre – latterly as part of the Glasgow Pavilion business. During this time the Gaiety developed a reputation as a variety theatre with a 'summer' variety show – the Gaiety Whirl – which ran for 26 weeks at its height. Many Scottish and UK stars appeared regularly on its stage, and several started their careers there. The programme offered more than a summer show however, with several weeks of Shakespeare and regular transfers from Glasgow Citizens theatre, being part of a varied offer.[citation needed]

After seventy years in private ownership the local council acquired the Gaiety theatre freehold in 1974. It then operated as a municipal theatre under direct local authority management. After many years of successful operation the theatre began to lose audiences and the council felt the revenue subsidy it provided and the requirement for capital investment required a new approach. In January 2009 the theatre closed, leaving Ayr without a theatre. The closure was met with considerable opposition and dismay among many Ayr residents, particularly since it appeared that the required capital and revenue investment to reopen the theatre would not be available. A public meeting attracted over 400 attendees, the future of the theatre was a key issue in the local press, many Scottish performers expressed their dismay and there was extensive discussion on social media.[citation needed] In early 2009 South Ayrshire Council invited tenders to take on the theatre management. The Ayr Gaiety Partnership (AGP), a charity formed for the purpose in Summer 2009, secured preferred bidder status. Just over three years later, having secured financial backing from the council and Scottish Government, as well as from local fundraising, AGP took on a 99-year lease of the theatre.

To the north of Ayr is the adjoining town of Prestwick, which is famous for its golf and aviation industries, thanks to the presence of Glasgow Prestwick International Airport. Only 5 miles (8 km) north of Ayr is Troon, a golf and seaside resort which has hosted British Open Championship. Ayr has three golf courses in Bellisle, Seafield and Dalmilling, as well as a private course called St Cuthberts. The area is synonymous as a seaside resort, with the south of the town housing the Craig Tara and Haven (formerly Butlins) holiday parks. The suburban village of Alloway to the south of the town is also well established for its associations with the poet Robert Burns. Further south, the fishing village of Dunure takes in a ruined castle which was formerly owned by the Kennedy family.

Ayr is served by three libraries plus a mobile library. These are:[38]

Alloway Library (attached to Alloway Primary school)

Carnegie Library (main library)

Forehill Library

The radio station West FM is based in Ayr and broadcasts on 96.7FM.[39] West FM is the main broadcaster in the Ayrshire area. The Ayrshire Post, serving all parts of Ayrshire, and Ayr Advertiser, serving the towns of Ayr and Prestwick, newspapers are also based in Ayr.[40] The Ayr Advertiser is Scotland's oldest weekly newspaper.

Ayr Racecourse is a well-known racecourse in Scotland and hosts both National Hunt and flat racing. It has the largest capacity in Scotland for horse racing.[citation needed] Notable events include the Scottish Grand National (April) and Ayr Gold Cup (September) as well as several night meetings. It was recently put up for sale by the owners and included the Western House Hotel as part of the potential sale.

The town has a strong history of ice hockey up to professional standard but no longer hosts a professional ice hockey team. The most recent professional team were the Ayr Scottish Eagles who played in the British Superleague between 1996 and 2002 based at the Centrum arena. During this time they have success most famously their grand slam season in 1997–98 winning all 4 titles available and becoming British Champions. The following season seen them compete in the European Hockey league with famous victories home and away to Russian champions AK Bars Kazan. Eagles finished 3rd in a group also containing clubs from Germany and Czech Republic. The Centrum closed in 2003 and was demolished in 2009 to make way to a Sainsbury supermarket.

Ayr's rugby union team, Ayr RFC, play at Millbrae and are reigning Scottish Cup Champions and Scottish Premiership Champions 2012/2013, and won the 2008/09 Scottish Hydro Premiership. Ayr RFC have twice competed in the British and Irish cup involving clubs from Scotland, England, Wales and Ireland.

Ayr only has one leisure centre, this being the Citadel, which opened in 1997, located at the mouth of the River Ayr and at the seafront at the South Harbour area. Its facilities include a main hall measuring 34 m × 27 m (112 ft × 89 ft). This hall can accommodate various sports including 5-a-side football, basketball, volleyball, netball, indoor hockey, indoor cricket practise, badminton and short tennis. As well as individual sports, sporting events and competitions, the hall has hosted exhibitions, concerts, trade fairs, election counts and awards ceremonies. The Citadel is an expansion of the Ayr swimming pool, which opened in 1972. The Citadel features a Dance Studio approx 124 m2 (1,330 sq ft). It is predominantly used for dance or exercise classes but also accommodates martial arts groups and drama workshops and two glass backed squash courts. The Citadel Leisure Centre in Ayr is home to South Ayrshire Volleyball Club[41] as well as being the town's only public swimming pool and diving pool. The leisure centre has squash courts, a gymnasium, dance studio, cafeteria and adjacent salons and youth club. An Ayrshire basketball team, the Troon Tornadoes, play their national league matches at the Citadel, despite not being an Ayr team. Additionally, Ayr has a Strathclyde league basketball team, Ayr Storm.

Ayr is also home to Scottish Bowling. The greens at Northfield host the Bowls Scotland and SYBA finals each year as well as the Hamilton Trophy final. Both the Ladies and Gents World Championships have been held at the Northfield complex as have international series and the Atlantic Rim Championships. Ayr Indoor Bowling Green is the oldest existing indoor bowling stadium in the world.

Ayr beach

Speedway was staged at Dam Park in 1937, when two meetings, organised by Maurice and Roland Stobbart from Cumbria took place, featuring riders who raced in the north of England, at venues such as Workington and Hyde Road in Manchester.

Ayr has a sandy beach with an esplanade. This is very popular with joggers and day-trippers. Whitletts Activity Centre also serves the town of Ayr. It has an 11-a side outdoor soccer pitch and an indoor 5-a-side football pitch. Near Whitletts Activity Centre there is also a 5-a-side football complex called "Pro Soccer".

The NHS Ayrshire and Arran Health Board serves South, East and North Ayrshire – a part of Ayrshire and Arran's departmental headquarters is located in Ayr. Ayr is also the regional headquarters of the Scottish Ambulance Service for south-west Scotland that is located in Heathfield, next to the site of the old Heathfield Hospital.

Ayr previously had four hospitals: Heathfield Hospital (originally a fever hospital, but latterly medical and ophthalmic), Seafield Hospital (a children's hospital), Ayr County (originally a voluntary hospital, and latterly confined to surgery) and Ailsa Hospital (a psychiatric hospital). Ayr Hospital was built in 1993 which replaced all but Ailsa Hospital which is still open.

Currently, three hospitals active hospitals lie adjacent to Ayr running along the A713 towards Hollybush in East Ayrshire, these are: