Complex sentence: Most of its facilities were turned into apartments, which was what spared the convent from destruction.
Split into simpler sentences: Most of its facilities were turned into apartments. Actually, this spared the convent from destruction.