Scotland's National Performance Centre for Sport is to be built in Edinburgh following a fierce competition to win the £30 million project.

Plans to expand the Riccarton Campus at Heriot-Watt University, where Hearts football team currently train, beat off rival bids from Dundee and Stirling.

The centre will support high performance in football, rugby and volleyball, and also cater for athletics, badminton, basketball, cricket, fencing, handball, hockey, netball, shinty and squash. The facility is due to open in 2016, with room for further expansion if required.

Deputy First Minister Nicola Sturgeon approved the recommendation from the national performance centre steering group, which was chaired by Scottish Football Association chief executive Stewart Regan.

The aim of the centre is to support elite athletes and their development in Scotland.

The Edinburgh centre will feature a replica of the Hampden Park pitch and other outdoor football pitches, as well as two rugby pitches, three tennis courts, a nine-court sports hall, an indoor football pitch and a large gym with sports science and medical facilities.

The Scottish international football and rugby teams will prepare for matches at the centre, which has been backed by the likes of Sir Chris Hoy and Gavin Hastings.

Ms Sturgeon said: "The National Performance Centre for Sport will be the jewel in the crown for Scottish sport. It will be the best place for our elite athletes to mentally and physically prepare to compete on the world stage, helping more Scots win, more often.

"The Heriot-Watt and City of Edinburgh Council team presented an inspiring vision which clearly demonstrated a positive commitment to developing high performance and a strong focus on partnership. I am ­confident they will deliver an iconic project, in a great setting, that takes Scottish sport to a new level."

The Deputy First Minister said the centre will add to the growing number of top level sporting facilities in Scotland, such as the Sir Chris Hoy Velodrome in Glasgow, the refurbished Royal Commonwealth Pool in Edinburgh, and Aberdeen Sports Arena.

Stewart Harris, chief executive of sportscotland, said: "Today is a very significant day for sport in Scotland as the National Performance Centre for Sport is a tremendous addition to Scotland's sporting facilities.

"This new multi-sport performance centre will complement the terrific facilities we have in Scotland, and assist our high-performance athletes in honing their skills and delivering on the world stage."

The Stirling plans had been backed by Andy Murray and Sir Alex Ferguson and would have taken in the current facilities at the University of Stirling.

The Dundee bid proposed ­building a completely new centre in Camperdown Country Park and was backed by the city's two professional football clubs.