Improve the coherence in the given text:
With the Habsburgs, Spain was one of the greatest political and military powers in Europe and the world for much of the sixteenth and seventeenth centuries.
With the Habsburgs, Spain was the foremost political and military powers in Europe and the world for much of the sixteenth and seventeenth centuries.