Castle Law hill fort, Perth and Kinross. Almost 40% of the hill forts of the UK and Ireland are found in Scotland
The locations and details of all ancient hill forts in the UK and Ireland have been mapped in an online database for the first time.
Scientists found 4,147 sites - ranging from well-preserved forts to those where only crop marks are left.
Researchers from the University of Edinburgh, University of Oxford and University College Cork spent five years on the project.
Nearly 40% are in Scotland, with 408 in the Scottish Borders alone.
Information on all the hill forts has been collated onto a website that will be freely accessible to the public so they can discover details of the ancient sites they see in the countryside.
The University of Edinburgh's Prof Ian Ralston, who co-led the project, said: "Standing on a windswept hill fort with dramatic views across the countryside, you really feel like you're fully immersed in history. "
This research project is all about sharing the stories of the thousands of hill forts across Britain and Ireland in one place that is accessible to the public and researchers."
Brown Caterthun near Edzell, Angus. Sometimes only vegetation marks and remnants of the forts show where they once stood
Prof Gary Lock, from the University of Oxford, said it was important the online database was freely available to researchers and others, such as heritage managers, and would provide the baseline for future research on hill forts.
He added: "We hope it will encourage people to visit some incredible hill forts that they may never have known were right under their feet."
In England, Northumberland leads the way with 271 hill forts, while in the Republic of Ireland, Mayo and Cork each have more than 70 sites.
Powys is the county with the most hill forts in Wales, with 147, and in Northern Ireland, Antrim has the most, with 15.
Hill forts were mostly built during the Iron Age, with the oldest dating to around 1000 BC and the most recent to 700 AD, and had numerous functions, some of which have not been fully discovered.
Hill fort near Alyth, Perth and Kinross. The researchers have found 4,147 sites across the UK and Ireland
Despite the name, not all hill forts are on hills, and not all are forts, the experts said.
Excavations show many were used predominantly as regional gathering spots for festivals and trade, and some are on low-lying land.
The research team from the University of Edinburgh, University of Oxford and University College Cork were funded by the Arts and Humanities Research Council to gather information from citizen scientists.
About 100 members of the public collected data about the hill forts they visited, identifying and recording the characteristics of forts, which was then analysed by the team.