Gandhi's presence and efforts in riot-torn areas, particularly in Calcutta and Noakhali, were instrumental in restoring peace and preventing further bloodshed during the tumultuous period of partition.