Being descended from Esau, the Edomites were regarded as Israel’s ‘brothers’ for centuries. In Moses’ reading of the Law, the Israelites were told:
Deuteronomy 23:7 Do not detest the Edomites or the Egyptians, because the Edomites are your relatives and you lived as foreigners among the Egyptians.
The favour wasn’t returned, it seems.
Towards the end of the Israelites’ wanderings in the wilderness (some 40 years after this law), Edom was established enough to refuse them permission to travel through the country. From then on, she was an enemy of Israel’s to be defeated in battle by Saul, David and other kings. At some stage, Edom adopted other gods, bringing judgement onto Amaziah, a later king of Israel, when he brought the associated idols home. Edom’s unseemly joy at the fall of Jerusalem to the Babylonians earned God’s judgement, as prophesied by Ezekial.