The two 100ft Wentworth elms have been identified in the Queen’s garden at the Palace of Holyroodhouse just a stone’s throw from the centre of Edinburgh.
Tree experts are now looking into ways of propagating the rare specimens, which carry the botanical name Ulmus Wentworthii Pendula.
Dr Max Coleman, of the Royal Botanic Garden Edinburgh (RBGE), identified the mature trees after they were noted as being unusual during a tree survey.
“Such a discovery when the trees in question are just shy of 100ft and in plain sight does sound rather odd,” he admitted.
“It is very likely that the only reason these rare elms have survived is because Edinburgh City Council has been surveying and removing diseased elms since the 1980s.
“Without that work many more of the thousands of elms in Edinburgh would have been lost.
“The success of this programme may be partly demonstrated in the way two rare trees have been preserved.”
The trees grow with a “weeping” appearance and have large glossy leaves.
Scientists say the Wentworth elm was most likely introduced to cultivation in the late 19th century but it was thought to have been wiped out in the devastating Dutch elm disease epidemic that destroyed up to 75 million UK trees during the late 20th century.
While the palace trees have been identified, it is not yet clear where the two specimens came from.
Curators and archivists at the royal household and RBGE are now working to find out more about their origins.
One theory is that the trees arrived at Holyrood from RBGE and survived while their Botanic Garden sibling died.
Archives already show that three Wentworth elms arrived at the Botanic Garden from Germany in 1902, after which all subsequent records refer to a single tree at the garden. The single Wentworth elm died in 1996 when it succumbed to Dutch elm disease.
Dr Coleman said: “Certainly, there was a close relationship between the palace and the garden in the early 20th century and the head gardener at Holyrood, William Smith, had trained here.
“Although we have no record here of elms going out, we know that a large number of ivy plants went from here to Holyrood to plant round the abbey ruins.”