Charles IV was King of Spain and ruler of the Spanish Empire from 1788 to 1808.
The Spain inherited by Charles IV gave few indications of instability, but during his reign, Spain entered a series of disadvantageous alliances and his regime constantly sought cash to deal with the exigencies of war. From Wikipedia