It went to extra time, and it was substitute Andre Schurrle who flicked in the first with his heel in the first period before Mesut Ozil made the result certain late on. There was still time for a late consolation from Abdelmoumene Djabou.
Read how the action unfolded below.
Germany: Weidenfeller, Zieler, Durm, Grosskreutz, Ginter, Khedira, Kramer, Draxler, Schurrle, Klose
Algeria: Zemmamouche, Si Mohammed, Cadamuro-Bentaiba, Medjani, Bougherra, Mesbah, Brahimi, Djabou, Yebda, Bentaleb, Ghilas, Mahrez
Thomas Muller has scored 9 goals in 9 World Cup games - coincidentally, the same record as Pele had at that stage. pic.twitter.com/NKYhhPgQ9y— Squawka Football (@Squawka) June 30, 2014