Complex sentence: In July 1878 he commanded the troops invading Bosnia and Herzegovina, and after three months of battle his troops captured Sarajevo on August 19, which then became the capital.
Split into simpler sentences: In July 1878 he commanded the troops invading Bosnia and Herzegovina. After three months of battle his troops captured Sarajevo on August 19, which then became the capital.