After a pulsating 90 minutes in Porto Alegre had ended goalless, Chelsea forward Schurrle - on as a half-time substitute for Mario Gotze - cleverly flicked in Thomas Muller's low cross two minutes into extra-time to give Germany the lead.
Ozil added a second late on to wrap up victory for Joachim Low's side, before Algeria, who performed admirably throughout, gained a consolation through Abdelmoumene Djabou.
The result meant Algeria were unable to exact revenge for the "Disgrace of Gijon", when West Germany and Austria played out a mutually beneficial 1-0 scoreline that saw both sides through from the group at the expense of Algeria in the 1982 finals in Spain.
With many pointing to that infamous match as motivation for Vahid Halilhodzic's men in the build-up, Algeria flew out of the blocks in the opening 20 minutes, cutting through the German backline on a number of occasions and seeing an Islam Slimani goal disallowed for offside.
The African nation - making their first appearance in the second round - continued to impress, but Germany, who will now face France at the Maracana on Friday, finished the stronger and remain on course to reach the semi-finals of a fourth successive World Cup.
Algeria made a flying start and Manuel Neuer had to make a sliding tackle to deny Slimani an effort on goal from wide on the left in the ninth minute, after the goalkeeper had initially misjudged a charge from his line.
Slimani converted Faouzi Ghoulam's wonderful cross from the left with a diving header in the 17th minute, but the referee's assistant correctly ruled that the Sporting Lisbon man had strayed offside, before Ghoulam flashed another effort narrowly off target as Algeria continued to dominate.
Germany gradually grew into the game towards the end of the first half, Muller heading wide and Ozil testing Rais M'Bolhi with a dipping effort.
Yet Algeria hit back in the 39th minute, Mehdi Mostefa thumping in a shot from 25 yards which deflected off Jerome Boateng and past the left-hand post with Neuer completely wrong-footed.
M'Bolhi made a superb double stop two minutes later, parrying Toni Kroos' drive away and then springing to his feet to keep out Gotze's rebound.
Germany enjoyed a more assured opening to the second period, Schurrle seeing an effort deflected just wide before Skhodran Mustafi, who replaced Mats Hummels in defence with Boateng switching to centre-back, headed straight at M'Bolhi from Kroos' delivery.
Philipp Lahm went close in the 55th minute, his curling effort diverted wide by an acrobatic save from M'Bolhi.
As the game wore on the play became stretched and Slimani sent a rasping effort from distance straight into the arms of Neuer 15 minutes from time.
Germany responded strongly and Muller ought to have scored his fifth goal of the tournament shortly afterwards, but his powerful header was beaten away by M'Bolhi.
Muller had another clear chance moments later, stabbing the ball wide after a glorious touch to bring the ball under control, while Bastian Schweinsteiger was unable to seriously trouble M'Bolhi with a weak header from Lahm's chipped pass.
Low's side then struck early in the first extra period, Schurrle adjusting brilliantly to backheel Muller's cross from the left into the net.
Algeria could have levelled through Mostefa, who snatched an effort wide from 10 yards after Germany failed to deal with a corner.
Ozil then made the game safe in the closing stages, lashing high into the net after Schurrle had been denied just in front of the goalline by Essaid Belkalem, although there was one final twist as Djabou converted a right-wing cross at the back post to net a deserved consolation for Algeria.
Algeria responded with an even later strike, but it all came too late to avoid tears. They bid goodbye to the World Cup, but they sure made a good impression of themselves!
Germany do it the hard way. They needed extra time to break the resistance of this brave Algeria side. Goals from Schurrle and Ozil in the additional period decide the game.
120' + 3' NEUER CATCHES! A looping header by a desperate Slimani doesn't have enough power on it to trouble the Germany keeper and that will do it! The referee ends an epic!
120' + 2' ALGERIA HAVE ONE BACK!
120' + 1' Goal Abdelmoumene Djabou
Surely too late for Algeria though, as a cross is drilled in from the right. It's narrowly missed by Slimani but Djabou is there to nod it into the back of the net! Is there enough time though?
119' Goal Mesut Özil That will do it! Ozil unselfishly tried to set up Schurrle with a square pass from close range, but the Chelsea man's shot was blocked with conviction by Belkalem. However, it only falls back to Schurrle, who squares it back to Ozil for the finishing smash!
119' OZIL ICES IT!
119' CHANCES AT THE DEATH! Muller skips past M'Bolhi to briefly find the goal unmarked, but his cutback can't find a teammate! Moments later, Slimani is felled just before breaking free, but the referee deems it a legal tackle!
118' Schurrle sportingly knocks the ball out of play as Belkalem goes down. He's been a warrior at the back for Algeria today and he looks to be okay to finish this game. Brahimi restarts the game just as sportingly by giving the ball right back to Germany.
116' Four minutes and change are all that separates Algeria from elimination. The fans from the African side are still making a lot of noise here. In fact, it's the German contingent who seem to be feeling the pressure more. Lots of worried eyes and nail biting.
114' Ozil's never really been a player for the latter grind-it-out stages of games and his fatigue has clearly gotten the better of him here. He tries, to his credit, to make a run down the left flank but simply touches the ball over the touchline, lacking the legs anymore to catch up to it.
112' The Algerian fans howl in disbelief as Slimani is called for an offside on their latest attempt at a counter attack. Replays show that the officials were spot on though, however marginal it was. Time starting to tick away here for the African side - the last remaining team from that continent in this tournament.
110' No stretcher needed in the end for Schweinsteiger, but he's taking a long time to limp off the pitch in obvious discomfort. He will be substituted and in his place will be the 23-year-old midfielder Christoph Kramer, who wears the same number as his age incidentally.
109' Substitution: Bastian Schweinsteiger OUT, Christoph Kramer IN
109' Lahm by the way has been booked for an untidy grab on the back of Feghouli. No doubt about that infraction and the referee obliges him with a yellow card. Meanwhile, the stretcher has been called for Schweinsteiger, who is clutching his knee in some pain.
108' Every single match in the knockout stages so far has been won by the group winners. Brazil, Colombia, Netherlands, Costa Rica and France all topped the standings in the previous stage. Germany are inching closer to making that stat a clean six for six.
107' Yellow Card for Philipp Lahm
106' Here we go then, the final stretch.
105' + 1' Germany have 15 minutes to hold onto this lead in what is turning into a dogfight. Schurrle broke the deadlock within moments of the start of extra time. Algeria have to dig deep now. Quick word from both coaches to their teams before we get underway again.
105' + 1' That's the end of the first half of extra time!
104' OHHH SO CLOSE! Sami Khedira makes up for his flub at the other end with an excellent run down the left hand side that completely frees him to get a ball into the area. However, it's played into no man's land - too far behind Schurrle and too far ahead of Muller!
102' ALGERIA MISS BY INCHES! Khedira makes a mess of a clearance from a corner and the ball drops to Mostefa just inside the area. It was a similar position to where Wesley Sneijder scored against Mexico and Mostefa attempted a similar shot, but it was lashed agonizingly wide!
100' Substitution: E. Soudani OUT, Abdelmoumene Djabou IN
100' NOT FAR WIDE FROM MULLER! Hunting for a fifth goal at this World Cup, the Bayern Munich forward shifts the ball onto his left foot and bends one just wide of the far post! Meanwhile, Algeria make their final change, with Djabou coming on for the industrious Soudani.
98' Halliche has gone down for the second time this game with cramp and this time I don't think he's getting back up to play any further part. Bougherra is being readied in a haste on the sidelines as Halliche slowly makes his way around the perimeter of the pitch.
97' Substitution: Rafik Halliche OUT, Madjid Bougherra IN
96' Oh dear Ozil, OH DEAR. He had the space and the time down the left hand side to advance on goal but attempted an all too predictable cut onto his right foot that Ghoulam was able to read and intercept. You could tell from the way he shaped his body that he intended to cut inside.
94' Well after a goalless 94 minutes or regular time, it took only 90 seconds of extra time for Germany to break the deadlock! How do Algeria respond, because Germany have some of the best in the world on the pitch at keeping a hold of the ball!
92' Goal Andre Schürrle
What a cheeky goal from the Chelsea man! Credit must go to Muller once again, who comes up with a decisive moment for his side. His low cross found Schurrle in position from close range, and he flicks the ball behind him cleverly to finish! 1-0 Germany!
92' GERMANY MAKE THE BREAKTHROUGH!
91' Extra time gets underway.
90' + 4' M'Bolhi rises to claim the corner and after a delayed restart to the game, boots it upfield and the referee signals for extra time!
90' + 3' Germany try to orchestrate a last, late attack in the Algeria half, but a careless giveaway from Boateng temporarily halts that maneuver. However it's soon back down in the final third, and Halliche has to react to clear Schurrle's low cross! Corner...
90' + 1' Into the first of four added minutes as Germany nearly steal a late winner! Schweinsteiger gets eyes on Lahm's cross and rises to direct a strong header goalwards, but M'Bolhi gets down well to save and smother the ball! Important stop that with bodies lurking for the rebound!
90' NEUER SWEEPING UP THE MESS AGAIN! Algeria, for one second, look to have a two on one break against a severely undermanned German defence. But out comes the Bayern keeper who just gets there ahead of his man to slide the ball out for a throw!
88' What a farce that was. Germany have four players standing over the ball ready to pull off an elaborate deception from the free kick. However Muller trips on the run up and is greeted by a sarcastic cheer from the crowd. The element of surprise gone, Germany rush it and duly get called for an offside.
87' Only treatment for Hallicehon the sidelines for now. However, the referee uses his eagle eyes to spot a handball on Feghouli, who looked to have legally blocked a Boateng shot legally. Great decision by the official and now Germany have a really promising free kick.
85' The corner is yet to be taken as Halliche is down with some cramp. Mostefa's giving him the good old hamstring stretch, but it doesn't seem to be working and the medical staff of Algeria are being summoned here. It might be the end of his night, but the African side have two subs left.
84' Germany ramping up the pressure to near critical levels here in the closing stages! They don't want this to go to extra time or the lottery of a penalty shootout! They win a corner after a giveaway by Slimani results in Ozil's cross being deflected over the goal line.
82' MULLER AND SCHURRLE SOMEHOW FAIL TO SCORE! An incredible let off for Algeria! First, Muller rose excellently to plant a header on goal that was met with an AMAZING save from M'Bolhi, before Schurrle flubs the rebound weakly into a defender!
80' SCHWEINSTEIGER! They were all up on the Germany bench as they thought that the breakthrough had finally arrived! Muller did well to delay his ball for the run of his Bayern teammate, who darted to the near post to flash an effort agonizingly off target!
78' Substitution: Saphir Taider OUT, Yacine Brahimi IN
78' You can't blame the heat. It's a positively chilly night in Porto Alegre. It's just been an old fashioned grind it out game. There's been two penalty shootouts already in the knockout stages of the World Cup. And based on this evidence, we may well be seeing another.
76' Are we heading for extra time here? Or can one of these sides snatch a winning goal? Looks like Algeria are set to make their first change of the match. Brahimi, who started his side's last two games and scored against South Korea, is the man to come on.
74' Starting to open up this game. Slimani's been a lot quieter in this half but he tests Neuer with a snap shot there. Moments later he nearly receives a good cross from Soudani at the far post, but Boateng shows good awareness to get in position to clear away the danger.
72' Usain Neuer bolts off his line once again to clear a long ball, this time using his head to play it out for a throw lest Slimani get possession in a dangerous area. He's bailed out his defence quite a few times today. Maybe he's the pacy option that Germany are missing on the flanks, who knows.
70’ Substitution: Shkodran Mustafi OUT, Sami Khedira IN
70' The expected change is made as Khedira is swapped in for Mustafi. This will move Philipp Lahm to his more natural right back slot - a position that I'm not sure why he hasn't been playing in from the start all tournament. Let's see if this is a positive adjustment for Germany.
69' Germany are a man short at the moment with Mustafi taking the long way around the pitch to get to the bench. Algeria have a free kick to whip in onto an undermanned German defence, but Soudani's ball can't beat the first man and it ends rather disappointingly.
67' Still very difficult to call here in Porto Alegre. Looks like Germany are being forced into a change here with Mustafi in some pain on the turf. He's getting some treatment to his lower back and Sami Khedira has been spotted getting stripped on the sidelines.
65' Tempo of the match has slowed down considerably - probably the very reason the Mexican wave started in the first place. Germany are still dominating the ball but Algeria are not being forced to defend as desperately as they once were in this half.
63' Algeria survive a slew of German onslaughts from corners as the pressure continues to be concentrated at one end of the field. Meanwhile, the Mexican wave, which has made something of a comeback at this World Cup, makes its way around the stands.
61' Mandi takes no chances with a tricky Schurrle ball that Muller was eying with some interest. He hacks it away with a powerful swing of his leg. Die Mannschaft are really starting to look the more likely side to open the scoring - Algeria are having trouble crossing the halfway line.
59' Well, you can't bet on this one staying goalless for long! Germany should take heart from the fact that all nine of their goals against African sides at the World Cup have come in the second half. Remember though, Germany have lost on the other two occasions when they've met Algeria in the past.
57' SWEETLY STRUCK FROM LAHM! The ball was touched to the German skipper on the edge of the area where he let fly with a delicious right footer, but M'Bolhi comes up with an awesome fingertip save it, divert it around the post! That looked like a net buster!
55' We've seen gripping start to the second half. Chances at either end and I'm still not quite sure what to make of Neuer's performance in this game. He's fumbled once or twice, been spotted scampering well outside his area but you can't say that it hasn't worked for him so far.
53' OH, WHAT A WASTE! Algeria have a four on three break with Soudani on the ball, but a superb block from Lahm denies him the chance of getting the ball into the unmarked Slimani. Mertesacker finishes the job on Feghouli and Germany survive that chance.
51' End to end stuff as Neuer has to fight to keep a hold of a dropped ball inside the area. He makes up for it with a superb kick out that requires a no nonsense clearance from Belkalem to concede a corner! The German delivery falls to Kroos outside the area but his hopeful shot is deflected away from danger.
50' M'BOLHI HANGS ON FOR DEAR LIFE! From the corner, Mustafi gets a free header in the centre of the box. He has all of the goal to aim at but can only plant it right into the arms of the Algeria keeper! Either side of him and that was in for the opener!
49' ALGERIA ESCAPE! The ball somehow rakes its way though a sea of bodies and Schurrle is suddenly one on one with M'Bolhi! However, a despairing Algerian leg makes the block and the ball loops menacingly into the air, but bounces just shy of the far post!
47' One change at the break as Low tries to inject some pace and directness into his lineup with the introduction of Schurrle for Mario Gotze. The Bayern man really hasn't looked comfortable sharing spaces in the final third with Ozil in this World Cup. Schurrle will provide more of an outlet.
46' Substitution: Mario Götze OUT, Andre Schürrle IN
46' Here we go again!
Goalless at the break but it's not for the want of trying. Algeria gave Germany all that they could handle during a storming opening to the game that had the Mannschaft defence rattled.
45' + 1' The first and only minute of injury time is played without incident, save a good piece of defensive work (at last) from Mustafi to prevent Ghoulam from winning a high ball against him. And with that, the referee has had enough for now, and signals for half time.
44' NOT A BAD LOOK FROM KROOS! The Bayern man never needs a second invitation to have a pop from long range and this time, from about 25 yards, he just misses the top corner with a belter! Germany are really starting to tighten the noose here as we approach half time.
43' Halliche becomes the first booking of the game for a stinging challenge on Schweinsteiger. Not a nice one to witness at all and no surprise to see the referee reach for his pocket. German fans always have a little flutter in their hearts whenever Schweinsteiger goes down!
42' Yellow Card for Rafik Halliche
42' M'BOLHI DOUBLE SAVE! The first was not so convincing as Gotze lashed a low strike to the near post that the keeper parried when he probably could have smothered. However, he gets to his feet like a rabbit to thwart Muller from the resulting rebound!
41' MOSTEFA DENIED! Wow, that was a STINGING shot from the Algeria midfielder which has to be blocked by Boateng! The fans give an audible gasp because that one wasn't too far away! Moments later, Neuer plays sweeper keeper twice in 30 seconds to bail out his defence.
39' Good stuff from Ozil at the top of the box sees him drift into an inch of space. Algeria suddenly look exposed with Boateng on the overlap down the left, but he looks laughably slow on the ball for some reason and Mandi can clear out for a corner.
37' Algeria's defensive diligence is really impressive. There seems to be two green shirts for every German player as the man on the ball is constantly hounded into safety-first passes. Can they keep up what is surely a fatiguing approach for the entire match?
35' OFF TARGET! That's more like the Germany we know! They go from patient to pulsating in the blink of an eye. A slow buildup around the box suddenly springs to life when Muller darts towards the far post, where Mustafi picks him out with aplomb. Germany's top scorer then drills a header just wide!
33' Feghouli presides over a promising free kick chance for Algeria near the edge of the box. This stadium has already seen a set piece stunner from Lionel Messi against Nigeria, but the Valencia man can't emulate the Argentine, and his effort is probably still rising.
31' Better from Germany here as they tee up a lovely move in the box, with Muller holding of his man and laying the ball off for Ozil. Belkalem desperately blocks the shot and the chance is gone, but Algeria looked rattled there for really the first time in this game.
29' NEUER FORCED OUT OF HIS COMFORT ZONE AGAIN! Soudani and Slimani both hound Mertesacker into submission and for a second, Algeria have acres free on the right flank. But once again, out comes Neuer to just about hack it away from danger!
27' Chilly night here in Porto Alegre and to top that off, it's been raining for a lot of the past few days. There were a number of puddles that made accessing the Beira-Rio something of a minefield, while the pitch has that rain-soaked zing to it that makes manipulating the ball a little tricky.
25' Germany try to put Algeria under some pressure from a corner. It's a dangerous delivery from Ozil, but it goes over the head of Arsenal comrade Mertesacker and a little too far away from the boot of Howedes. Belkalem can get a big boot in to clear.
23' Mustafi was a shock call to make the 23-man Germany squad for the World Cup, with so many names seemingly ahead of him once Marco Reus went down with an injury. And in truth, his tournament so far has shown why he was such a left-field call - he's been torched by any decent turn of pace.
21' Porto Alegre is home to the largest community of German descent in Brazil and the locals surely cannot be happy with what the motherland is trying to pass off as a performance. Jogi Low looks as guilty as that time he got caught on camera picking his nose. His side need to step it up.
19' ALGERIA ARE DOMINATING HERE! Look at this in the Estadio Beira-Rio! Chance after chance for Algeria and they narrowly miss converting from another. Ghoulam continues his menace on the left flank as he beats a pathetic covering attempt from Ozil to flash a poisonous ball across the face of the goal!
17' ALGERIA HAVE A GOAL RULED OUT! Ghoulam puts in one of the crosses of the tournament from the left hand side that catches the German defence out bu Slimani, who dived expertly to head it in, was a tad offside. That wasn't the result of any kind of German offside trap, mind, just poor concentration at the back.
15' Again trouble for the German defence! Feghouli gets a run onto Lacen's through pass far too easily to make his way to the byeline. German hearts are in their mouths for one second as he advances to the near post, but he gets too excited in the moment and lashes his cross well over the bar.
13' Germany's back four are looking like they've poured cement in their boots before the game. They look uncomfortable when confronted with any kind of pace. However, Schweinsteiger attempts to restore normalcy at the other end with a snap shot that M'Bolhi has to react to.
11' Slimani's really looking like a bonafide threat early on here. He gets the ball with space between the midfield and defensive lines and skips past Boateng, but can't do the same to Mertesacker, who thwarts him excellently. Where was the Germany midfield there though, the defence had no protection!
9' NEUER ALMOST MADE A FOOL OF! Islam Slimani shows just how he earns his corn, using his speed to breach the defensive line and get a clean run on goal. He's met unexpectedly by Neuer, who takes a huge risk sprinting far out of his box to confront the striker. To the keeper's credit though, he manages to divert the ball away.
7' Kroos shows some admirable dexterity to swivel away from Moustefa in midfield, only to be brought back down to earth, quite literally, by the Algeria midfielder. Probably a tad luck to escape a booking there, Moustefa as Kroos had acres of real estate to run into.
5' Hardly a touch of the ball in the opening exchanges for Algeria. Slimani has been mostly force-fed off scraps from goal kicks and hopeful punts forward out of the back. It already looks like Boateng has assumed the mantle of marking the Algeria front man, with Mertesacker providing cover.
3' Early sign of intent from Germany as Mustafi scampers free down the right hand side to latch onto Ozil's ball, only to be narrowly called for an offside. The repays suggest that the officials may have well made a gaffe there though, as he looked level with Halliche to me.
1' Germany get us underway!
Anthems are done, and we're all set.
Germany have a few members of the Muslim faith in their squad, but the likes of Mesut Ozil have revealed that he will delay his fast when it contradicts with his side's World Cup obligations. Another interesting wrinkle to what is shaping up to be a fascinating tie.
The onset of Ramadan has caused some concern around this match, with Algeria's Muslim-heavy lineup. Most of their players have pledged to observe the fasting required of the holy period, with Algeria skipper Majid Bougherra admitting that the lack of fluids is the hardest part - especially in the heat and humidity of Brazil.
Anyway, back to the present. France ground out a 2-0 win over Nigeria earlier in the day to advance to the last eight and by the laws of the bracket, they will face the winner of tonight's matchup. Germany are the clear favorites here but Algeria do have two wins against Die Mannschaft in their only two meetings.
The highlights of that match make for some head-banging monotony. Both teams basically stopped playing to ensure their progression. In fact, it was so against the spirit of the game that Fifa, in one of their finer moments, decided that all group finales would be played simultaneously so that no team had the advantage of knowing their rivals' results beforehand.
I'm obligated to remind you of the Nichtangriffspakt von Gijon of the 1982 World Cup. For those whose German is not as good as my Google spell checking skills, it was a notorious 1-0 win for West Germany over Austria - a result that both sides played out in deathly boring fashion to ensure that they both advanced to the next round at the expense of Algeria.
Yacine Brahimi and Abdelmoumene Djabou both scored in the emphatic 4-2 win over South Korea that helped put Algeria through to the knockout stages. However tonight, both players have to settle for a spot on the bench.
Generally an expected lineup from Algeria coach Vahid Halihodzic. Key for the African side will be the man up front Islam Slimani. His pace and movement off the ball could be a test for the German defence should he go running right at Per Mertesacker - never known for his speed.
The rest of the German starting lineup looks the same, save for the expected removal of Lukas Podolski from the starting lineup in favour of Mario Gotze. Red-hot Thomas Muller continues as the lone roaming front man for Die Mannschaft.
So the big news for Germany is the withdrawal of Mats Hummels with an illness. In comes Shkodran Mustafi to man the defence, though he hardly had the most secure game against Ghana in the group stages. This means that Jerome Boateng will move into the centre of the defence to team up with Per Mertesacker.
ALGERIA SUBS: Zemmamouche, Si Mohammed, Cadamuro-Bentaiba, Medjani, Bougherra, Mesbah, Brahimi, Djabou, Yebda, Bentaleb, Ghilas, Mahrez.
ALGERIA (4-5-1): Mbolhi; Ghoulam, Belkalem, Halliche, Mandi; Lacen, Soudani, Taider, Mostefa, Feghouli; Slimani.
GERMANY SUBS: Weidenfeller, Zieler, Durm, Grosskreutz, Ginter, Khedira, Kramer, Draxler, Schurrle, Klose.
GERMANY (4-2-3-1): Neuer; Mustafi, Mertesacker, Boateng, Howedes; Schweinsteiger, Lahm; Ozil, Kroos, Gotze; Muller.
Before we go any further, let's dive right into our teams for tonight's clash in Porto Alegre.
Germany and Algeria do battle. A clash with France awaits the victor. I'm Keeghann Sinanan, your guide for all the action.
COMMENTARY: Goal dot com