Historical Rathfarnham landmark Loreto Abbey is to be restored and turned into a school once again.
The building – where Mother Teresa studied English in Dublin – is coming under the control of the Department of Education and will become a gaelscoil for the region.
The Department has purchased the property from NAMA through estate agent Savills for approximately €2.3m.
However, it will need at least a further €10m to transform the 250-year-old complex into a modern educational facility.
The building has a protected listed status and has been empty for 15 years after the 1999 purchase by a company owned by developer Liam Carroll.
After Carroll went bankrupt, the site was taken over by NAMA before it was put up for sale last August.
The roof was recently weatherproofed by NAMA and the house was occupied by live-in "guardians" provided by the UK-based property minding company Camelot.
The Department of Education said it would not comment on conversion costs due to "commercial sensitivities".
However they said they are "satisfied" the property meets their needs.
The renovation costs will cost significantly more than the amount needed to build a new school. But considering the fact that the State would have to rescue it anyway and is under pressure to create new schools in Dublin, the move is being described by property sources as "killing two birds with one stone".
The main building, Rathfarnham House, was constructed in 1725. The architect, Edward Lovett Pearce, was best known for the old Houses of Parliament at College Green.
Closed in the late nineties, Loreto had been a famous boarding school for Catholic girls. Its most famous pupil was Mother Teresa of Calcutta, who went there to learn English in the 1920s, at the age of 18.