However, the home side will have felt before kick-off that three points were there for the taking and that somehow they had allowed them to slip away in a lacklustre display.
Having beaten Blackburn Rovers at Ewood Park a week earlier, the Black Cats were looking to build on the win at home to the Hammers.
The early signs were good for the hosts as they forced the opening proceedings.
But on far too many occasions this term the Wearsiders have failed to capitalise on their dominance and so it proved again as a number of half chances passed by striker Djibril Cisse.
Still things looked to be going to plan with the visitors encamped in their own half for much of the opening 15 minutes.
That all changed with a rare flurry forward and a stroke of luck caught the Cats napping.
Phil Bardsley conceded a free-kick just outside the right corner of the Sunderland penalty area on 20 minutes.
Julien Faubert's ball was only partially cleared and a Behrami strike hit Sunderland forward Kenwyne Jones on the heel before deflecting past Marton Fulop and into the net.
The goal appeared to give the Hammers a belief which they had previously been missing, but even then they never really took the game to their hosts.
The visitors should however have been two goals to the good at the break.
Ex-Hammer Anton Ferdinand was caught in possession by Craig Bellamy and even though he was forced out wide by Fulop, the Welshman managed to find Behrami.
The midfielder appeared to have the goal at his mercy, but somehow managed to crash his shot off the crossbar from close range.
The half-time whistle was greeted by boos from the home support, but their derision was reserved for referee Mike Dean rather than their misfiring team.
The Wirral-based official waived away what seemed a definite foul on Jones in the West Ham area by James Collins.
And Dean again failed to give anything as the same player dragged Cisse to the floor just outside the box as he homed in on goal.
There was cries for a penalty, but while there was no doubt the foul was committed outside the box, there were question marks over whether or not Collins as last man should have received his marching orders.
As it stood the arguments mattered little as the referee failed to even award a free-kick.
After the break Sunderland pressed looking for a way back into the game while their opponents were happy to try and hit them on the break.
Neither side managed to get a grip on the game and, as a result, a rather scrappy affair followed.
The Hammers rearguard comfortably held on for the three points and headed back to London with the job done.
For Sunderland it is back to the drawing board as they look to find some sort of consistency that will bring a winning formula and ensure that they move away from the threat of relegation.