Was Islam spread by the sword?

Was Islam spread by the sword?

Was Islam spread by the sword?

While Muslim armies engaged in battles, these were not to force
conversions but often for defence or justice, as warfare was a reality
of the time.