Edinburgh Castle joined military landmarks around the country as they were lit up to mark 20 years since the ban on gay troops serving in the armed forces was lifted.
Until Jan. 12, 2000, lesbian, gay and bisexual people were not allowed to serve in the British Army, RAF, or the Royal Navy.
While many still signed up, they faced an investigation and dishonourable discharge if the military found out.
The government overturned the long-standing ban following a landmark ruling at the European Court of Human Rights that declared it was a breach of private life. Two decades on, the army have been celebrating and Edinburgh's historic fortress - which remains a military garrison - saw the colours of the rainbow flag projected onto its walls last night.
The Army in Scotland said on Twitter: "On the 20th anniversary of the landmark ruling, which saw the lesbian, gay & bisexual community allowed to serve in the UK Armed Forces, @edinburghcastle has been lit in the colours of the rainbow flag.
"A historic military fortress, it is still a military Garrison HQ #LGB20."