Complex sentence: When Scipio arrived, the city was heavily defended and the gates were closed from all trespassers giving the Romans the perception that the inhabitants were fearful of their treason.
Split into simpler sentences: When Scipio arrived, the city was heavily defended and the gates were closed from all trespassers. This gave the Romans the perception that the inhabitants were fearful of their treason.