In 1814, three years after it gained its independence on May 14, 1811, Paraguay was taken over by the dictator José Gaspar Rodríguez de Francia. During his rule which lasted from 1814 until his death in 1840, he closed Paraguay's borders and prohibited trade or any relationship between Paraguay and the outside world. The Spanish settlers who had arrived in Paraguay just before it gained its independence were required to marry old colonists or the native Guarani in order to create a single Paraguayan people.