Goals from Darren Blewitt, Marce Collington, David Shaw and Sam Wright secured three points for Kevin Keen's youngsters, while an Ayo Akinsete header rescued a point for Tony Carr's older side, who now require one more victory from their last two group matches to make sure of qualification for the play-offs.
The under-17s got off to an understandably nervy start in their clash against Middlesbrough, with neither side pushing too many men forward or enjoying any sustained possession, but the breakthrough arrived on 25 minutes when Mitchell Cole produced a piece of skill in the penalty area and was brought down for a clear spot-kick.
Darren Blewitt stepped up and confidently found the net from 12 yards to give his side a lead they took into the half-time interval.
Hammers came out for the second half hoping to secure a two-goal cushion as soon as possible, but no-one could have predicted just how quickly they would achieve that aim. From the kick-off, the ball was played out wide to Chris Cohen, whose cross was flicked on by Cole for Collington to stab the ball home - less than 10 seconds after the restart!
That put Hammers firmly in the driving seat, but Middlesbrough got back into it with 20 minutes remaining, converting from a corner. 10 minutes later, though, substitute Shaw restored our two goal advantage with a header from a corner and, in the final minute of the game, Wright rounded off an excellent performance by slotting home the fourth from a Cole cross.
Team: Behcet, Henry, Parrington, Blewitt, Wright, Tucker, Noble, Cohen, Ephrain (Shaw 75), Cole, Collington (Stokes 70). Subs unused: Allen, Reed White.
Meanwhile, Ayo Akinsete's 55th minute header from Daryl McMahon's cross rescued a point for the under-19s in a tight game against Southampton.
The Saints had taken a first half lead and, once Hammers equalised, the game could have gone either way. Carr's team now need one more victory from their last two matches to secure qualification to the last eight of this season's tournament.
Team: Sealey, McClenahan, Tattam, Ferdinand, Ward, Lumsden, Akinsete, Bunce, Morris (Yao 70), Pearson (80), McMahon. Subs unused: Fletcher, Lee, Jackson.