The Hammers went into the game having won just one of their previous 12 Premier League games, and faced a new manager in the Sunderland dugout.
The Black Cats sacked Gus Poyet earlier this week, and Dutchman Gus Advocaat was taking charge of his first game as Sunderland boss at Upton Park.
The game itself wasn't a particularly fascinating one, with two sides clearly devoid of confidence going against each in what looked like being a drab stalemate.
Yet with just two minutes to play, Advocaat was left heartbroken as Diafra Sakho smashed home a pass from Mark Noble to hand West Ham their first win since January.
It was a much needed win for under-fire manager Sam Allardyce, whilst Sunderland remain just one point above the relegation zone after his result - and Advocaat will need to turn things around quickly to make sure the Black Cats aren't playing Championship football next season.