Dunedin Prison, which has been empty for five years, is to be redeveloped.
The Category one, 116 year old brick building has been bought by the Dunedin Prison Charitable Trust for an undisclosed sum.
The trust plans to turn the building into a tourist attraction, with a cafe, office areas, function areas and a prison tour.
Chair Stewart Harvey says fund-raising will now begin for $2.6 million needed for the first stage of development, which could be completed by the end of next year.
Dunedin Prison is a Victorian-style courtyard prison and is one of the oldest prisons in New Zealand.
It was decommissioned in 2007. About 59 medium-security prisoners and 40 remand prisoners were held there at that time.