Dom Pedro enjoyed the support of the country's rural, slave-owning aristocracy, who felt threatened by both Portugal's grip and the republican-revolutionary movements sweeping across Spanish America. The aristocracy endorsed a constitutional monarchy as the best way to preserve its own interests, while at the same time riding the wave of nationalism triggered by the French Revolution. It was only in 1889, after the nation witnessed a growing urban entrepreneurial class and strains between the military and the royal aristocracy, that Brazil finally became a republic and deposed the then ruler Dom Pedro II.