<P> The Dominican Independence War gave the Dominican Republic autonomy from Haiti on February 27 , 1844 . Before the war , the island of Hispaniola had been united under the Haitian government for a period of 22 years when the newly independent nation , then known as the Republic of Spanish Haiti , was invaded by Haiti in 1822 . Previously known as the Captaincy General of Santo Domingo , the criollo class within the country overthrew the Spanish crown in 1821 before unifying with Haiti a year later . </P>
who did the dominican republic gain its independence from
Haiti