The Dutch Republic gained independence from Spanish rule in 1581 and established a colonial empire between the 17th-20th centuries by following other European powers. The Dutch East India Company was founded in the early 1600s to control Dutch trading interests in Southeast Asia, establishing colonies and becoming a powerful state-within-a-state by 1700, until it went bankrupt in 1800 and its territories were absorbed by the Dutch government.