Source · the work in full

Rashi on the Prophets and Writings

CC BY · The Judaica Press Complete Tanach, trans. A. J. Rosenberg
Chapter 1

Amos 1

who was among the herdsmen Heb. בַנֹּקְדִים. Jonathan renders: who was an owner of livestock. Cf. (II Kings 3:4) “Now Mesha the king of Moab was an owner of livestock (נֹקֵד).”
two years before the earthquake—Two years before Uzziah was plagued, the day Isaiah prophesied, as it is stated: (Isaiah 6: 4) “And the doorposts quaked,” and it is stated: (Zechariah 14:5) “As you fled before the earthquake.”

shall roar from Zion—From the Holy of Holies the speech emanates.
and the dwellings of the shepherds shall be cut off—Jonathan renders: And the dwellings of the kings shall become desolate, and the strength of their walled cities shall be destroyed.

For three transgressions of etc.—As it is stated (Job 33:29) “Lo, all these things does God work, twice, yea, thrice, with a man.” But He does not forgive more (according to Shem Ephraim). And here, it is as follows: I have already behaved toward them according to My standard, to forgive them for three transgressions, and if there are more, surely the smaller number is included in the larger amount.
yea for four I will not return them—For the fourth transgression, I need no longer return him empty- handed from taking his recompense from Me, and surely since there are many transgressions in their hands; now I will visit upon them the retribution for threshing the inhabitants of Gilead, their neighbors.
with sledges of iron—Jonathan renders: morigin of iron. Now that is a sort of file called ‘lime,’ which is made with numerous grooves, and with which they chastise people with tortures, and with them they cut the stubble of the grain to make straw.

Hazael etc. Ben Hadad—The kings of Aram, and the head of Aram is Damascus.

from Bik’ath-Aven—That is a place in Aram.
and one who holds the scepter—[Jonathan renders:] and one who exercises sovereignty. Cf. (Gen. 49:10) “The scepter shall not turn away from Judah,” since the ruler castigates the people with sticks.
from Beth-Eden—A place name.
to Kir—A place name, where Sennacherib exiled them during the time of Ahaz, as it is stated: “And he went up to Damascus and seized it, and exiled Aram to Kir.” [see II Kings 16:9, where the wording differs.] All the retribution that the prophets of Israel prophesied concerning the nations - the prophets who preceded Sennacherib, e.g. Isaiah and Amos, prophesied concerning the sword of Sennacherib, and Jeremiah and Ezekiel prophesied concerning the sword of Nebuchadnezzar.

Gaza—That was a city of the Philistines.
a whole captivity—I.e, the captivity of Israel, that the captivity be complete, that no one should escape, for they would stand on the roads and seize those fleeing and deliver them. And so did the people of Tyre, and so to the four sides during the destruction of the Second Temple, as is delineated in the Aggadah of Ha’azinu (Sifre 322), Gaza from the south, Tyre from the north, Damascus from the east, the Arabs from the west, as it is stated: (Isaiah 21: 13) “The harsh prophecy concerning Arabia: In the forest in Arabia did you lodge, on the roads of your cousins.”

Ashdod... Ashkelon... Ekron—They were the lords of the Philistines.
and I will return My hand—I will smite them repeatedly.

and did not remember the brotherly covenant—which existed between Hiram and Solomon, as it is said: (I Kings 5:26) “And they both made a league together.” And they called each other brothers, as it is said: (ibid. 9:13) “And he said: ‘What are these cities that you have given me, my brother?’”

for pursuing their brother with a sword—As it is said: (Num. 20:18) “Lest I go forth against you with the sword.” And he still clings to his anger, keeps his wrath, and has not retracted it.
and grasped forever their anger—He clung to it and did not let it go.

the palaces of Bozrah—It is between Moab and Edom, and it belonged to the land of Moab, but it was attracted to Edom. And it set up a king for them when the first king died, and it is said: (Gen. 36: 33) “Jobab the son of Zerah from Bozrah.” [from Gen. Rabbah 83:3]

they ripped up the pregnant woman of Gilead—They destroyed it and also ripped up their pregnant women so that no heir would remain who would contest the inheritance. And so does Scripture state: (Jer. 49:1) “Concerning the children of Ammon. So said the Lord: Has Israel no sons? Has he no heir? Why has Malcam taken possession of Gad?”

You arrive at the cited line; the whole work is yours to read around it. The text is set from the cited public-domain edition.