Complex sentence: León had been the capital of Nicaragua since colonial times, so naturally when Nicaragua withdrew from the United Provinces of Central America in 1839, León became the capital of the new nation.
Split into simpler sentences: León had been the capital of Nicaragua since colonial times. So naturally, when Nicaragua withdrew from the United Provinces of Central America in 1839, León became the capital of the new nation.