And they went ahead when Castro, who also scored in a 1-1 draw against England in the group stages, made no mistake after Ozil's fine pass.
Ozil was a constant thorn in England's side and went close shortly before half-time with a 25-yard free-kick that struck Cranie and flew just over.
But there was no escape for England three minutes after the interval.
Ozil tried his luck with a free-kick from a much greater distance that was hit straight at Loach.
The Watford keeper ought to have made a routine save but was badly positioned and inexplicably allowed the ball to roll into the net.
It was a terrible moment for Loach, who had been selected ahead of Peterborough United's Joe Lewis to replace the suspended Joe Hart.
Loach's mistake left England facing an uphill struggle
Cattermole struck the top of the bar with a ferocious shot as England tried in vain to find a way back into the match.
Their cause was not helped when Johnson missed the target from close range after some great work on the right by James Milner.
Worse followed for England, with Ozil again wreaking havoc and threading through a perfect pass for Wagner, whose cool finish effectively sealed Germany's victory.
Their win was rubber-stamped six minutes from the end, when Wagner sent a right-foot shot beyond Loach and into the far corner.
Bookmark with:
What are these?