Haftar was born in the Libyan city of Ajdabiya. He served in the Libyan army under Muammar Gaddafi, and took part in the coup that brought Gaddafi to power in 1969. He took part in the Libyan contingent against Israel in the Yom Kippur War of 1973. In 1987, he became a prisoner of war during the war against Chad after being lured into a trap and captured, which was then a major embarrassment for Gaddafi and represented a major blow to Gaddafi's ambitions in Chad. While being held prisoner, he and his fellow officers formed a group hoping to overthrow Gaddafi. He was released around 1990 in a deal with the United States government and spent nearly two decades living in the US in Langley, Virginia, and gained U.S. citizenship. In 1993, while living in the United States, he was convicted "in absentia" of crimes against the Great Socialist People's Libyan Arab Jamahiriya and sentenced to death.