Complex sentence: Brazil's War of Independence was waged between Brazil and Portugal and lasted from February 1822, when the first skirmishes between militias took place, to November 1823, when the last Portuguese garrison surrendered.
Split into simpler sentences: Brazil's War of Independence was waged between Brazil and Portugal. It lasted from February 1822, when the first skirmishes between militias took place, to November 1823, when the last Portuguese garrison surrendered.