Complex sentence: The Habsburgs were deposed from the Portuguese throne in 1640 two years before this dukedom was created, a title which was never recognised in Portugal, but remains extant in Spain.
Split into simpler sentences: The Habsburgs were deposed from the Portuguese throne in 1640, two years before this dukedom was created. The title was never recognised in Portugal, but it remains extant in Spain.