On 22 June 2011, the Algerian Football Federation announced that Halilhodžić would take over the vacant Algeria national team manager position starting on 1 July. On 2 July, the deal was made official with Halilhodžić signing a three-year contract. He successfully led Algeria through the 2013 Africa Cup of Nations qualification and in preparation for the finals tournament to be held in January 2013 in South Africa, the team invited Bosnia and Herzegovina (Halilhodžić's country of birth) for a friendly match in November 2012. Algeria lost 0–1 in injury time on a rainy night in Algiers.