Complex sentence: The III SS "Panzer" Corps suffered heavy casualties defending the Tannenberg Line, until on September, the headquarters of the Army Group North pulled it back into Latvia to defend the capital, Riga.
Split into simpler sentences: The III SS "Panzer" Corps suffered heavy casualties defending the Tannenberg Line. The division was pulled back into Latvia to defend the capital, Riga.