The Amalekites came and attacked the Israelites at Rephidim.
Read Exodus 17:8 Using Other Translations
Then came Amalek, and fought with Israel in Rephidim.
Then Amalek came and fought with Israel at Rephidim.
While the people of Israel were still at Rephidim, the warriors of Amalek attacked them.
Scripture quoted by permission. Quotations designated (NIV) are from THE HOLY BIBLE: NEW INTERNATIONAL VERSION®. NIV®. Copyright © 1973, 1978, 1984, 2011 by Biblica. All rights reserved worldwide.
(New International Version Bible Online)