McNamee celebrates after his well-taken goal
Watford earned a welcome respite from their Premiership struggles as they moved into the FA Cup fifth round with a hard-earned win over West Ham.
Bobby Zamora hit the bar after a minute but West Ham never got any closer.
Anthony McNamee broke the deadlock with a 42nd-minute overhead kick after goalkeeper Roy Carroll's mistake.
The Hornets had to come through a second-half onslaught, with their brave display summed up by Jordan Stewart's late header off the line.
It could have all been very different had Zamora's early header been two inches lower, but Watford fully deserved their second ever win at Upton Park.
Early on, Ben Foster showed why he ended up as a goalkeeper rather than a midfielder, making a hash of clearing a simple backpass to hand the Hammers the chance.
Foster tried to shield the ball into his area, but clumsily conceded a corner from which Zamora very nearly punished him.
Watford did have the ball in the net after 15 minutes but Francis' toe-poke, after a Malky McKay header across goal, was ruled out for offside.
West Ham gradually re-established themselves with Nigel Quashie and Shaun Newton drawing good saves from Foster, while Stewart had to clear Christian Dailly's header off the line.
Moments later though, Darius Henderson's header looked to be goalbound before Cole intervened for West Ham but Watford's players complained the striker had used his arm.
Aidy Boothroyd gives his players the thumbs-up
Watford's goal finally came on 42 minutes, and the assist should go down to Carroll.
The West Ham keeper rushed out to deal with a long ball, but flapped ineffectually at the ball - and McNamee was perfectly placed to take advantage with a skilful bicycle kick.
After the break, West Ham looked much more menacing as they carved out chance after chance - but Alan Curbishley's side were not able to take any of them.
Zamora powered a shot on the turn straight at Foster, and the striker should have done much better when he headed Newton's pinpoint cross over the bar.
Cole skipped past Jay DeMerit on the touchline and sped towards the box, but he ended up running down a blind alley and getting himself booked for a ridiculous dive.
As the minutes ticked down, West Ham players were queuing up to squander opportunities.
Luis Boa Morte, Newton and Cole all failed to trouble the keeper as West Ham's supporters grew increasingly frustrated.
Teddy Sheringham's late lob to the back post looked to just need the slightest of touches from Zamora, but Stewart produced a brilliant header to save the day.
West Ham boss Alan Curbishley:
"There wasn't much in the game. We probably edged it on chances created but we can't get away from the fact that we let in a bad goal.
"It was a poor decision and resulted in Watford going ahead.
"We huffed and puffed in the second half but couldn't take the chances we did make. That just about sums it up."
Watford manager Aidy Boothroyd:
"I'm very proud - we were resolute and resilient and gave West Ham a few problems.
"We rode our luck at times and in the end we came through. It's a nice feeling to win two games in a row.
"I don't see us doing the double but if we can keep winning games in the FA Cup and the league then obviously that's going to be good for us."
West Ham: Carroll, Neill (Pantsil 48), Spector, Dailly, McCartney, Newton (Sheringham 65), Reo-Coker, Quashie, Boa Morte (Etherington 77), Zamora, Cole.
Subs Not Used: Green, Mullins.
Booked: Neill, Cole.
Watford: Foster, Mariappa, Mackay, DeMerit, Stewart, McNamee (Powell 72), Bangura, Francis, Bouazza, Smith, Henderson.
Subs Not Used: Chamberlain, Doyley, Kabba, Ashikodi.
Goals: McNamee 42.
Ref: H Webb (S Yorkshire).