Original: When the latter, in 1398, was sold to the Visconti of Milan, the island was acquired by the Appiani, Lords of Piombino, who retained it for two centuries.
Simplified: In 1398, was sold to the Visconti family of Milan. After a few years, the island was acquired by the Appiani, Lords of Piombino, who kept it for two centuries.