An alliance is a close association of powerful individuals or nations for a common goal. Such alliances were confirmed in various ways:
giving gifts
making oaths
paying money to the family when marrying (dowries)
arranging marriages between important families
making special agreements (covenants)
In the time of the patriarchs (when Abraham, Isaac, and Jacob lived), Israelites made alliances with foreign nations easily. Abraham made alliances with:
three Amorites: Mamre, Eshcol, and Aner (Genesis 14:13, 24)
Abimelech, king of Gerar (Genesis 21:22–34).
Isaac, Abraham's son, also allied with Abimelech (Genesis 26:26–31).
Later, Moses did not allow alliances with the Canaanites for religious reasons (Exodus 23:31–33; 34:12; Deuteronomy 7:1–4). In the time of the judges, the Israelites were reminded of this command (Judges 2:1–3). But, Joshua 9 tells how Israel was tricked into an alliance with the Gibeonites.
During the monarchy, many kings made alliances and intermarried with foreigners:
David (before he was king of all Israel) agreed with Achish, king of Gath, to fight with the Philistines against Saul’s army (1 Samuel 27:1; 28:2).
Solomon made trade alliances with Hiram of Tyre (1 Kings 5:1–18; 9:26–28).
Solomon also made trade alliances with the king of Egypt (1 Kings 9:16).
Asa allied with Ben-hadad, king of Syria (1 Kings 15:18–20).
King Ahab allied with Jehoshaphat to fight Syria (1 Kings 22:1–4; 2 Chronicles 18:1–13).
King Pekah allied with Rezin, king of Syria, to fight Ahaz, king of Judah (Isaiah 7:1–9).
King Ahaz allied with Tiglath-pileser, king of Assyria, to fight against Pekah and Rezin (2 Kings 16:7–9).
King Zedekiah allied with Egypt to fight against the Babylonians (2 Kings 24:20; Ezra 17:1–21).
These alliances often brought foreign religions into Jerusalem (2 Kings 16:10–18). This led the prophets to criticize them (Hosea 8:8–10; Isaiah 30:1–3, 15–16; Jeremiah 2:18).