The verb repel means to make someone or something to move away or stop attacking you.

Synonyms are push away, fend off, resist, or decline.

The word origins from Old French (15th century) repeller or directly from Latin repellere meaning “to drive back”. It comes from re– meaning “back” plus pellere meaning “to drive, strike”. Its meaning “to affect (a person) with distaste or aversion” is from 1817.

Using water cannons, the police repelled the protesters.

That insecticide is very effective, it repels flies.

They have thousands of armies along the forest ready to repel any attack.