Original: This latter post he held until 1866, when he became principal of the Royal Academy of Music.
Simplified: He held this post until 1866, when he became principal of the Royal Academy of Music.