So Joshua defeated Amalek and his people with the edge of the sword.
Exodus 17:13
Surrounding context
17:12 But Moses' hands became heavy; so they took a stone and put it under him, and he sat on it. And Aaron and Hur supported his hands, one on one side, and the other on the other side; and his hands were steady until the going down of the sun.
17:13 So Joshua defeated Amalek and his people with the edge of the sword.
17:14 Then the LORD said to Moses, "Write this for a memorial in the book and recount it in the hearing of Joshua, that I will utterly blot out the remembrance of Amalek from under heaven."