Arsenal, having asserted their title credentials at Manchester City last weekend, needed to avoid falling into old traps at the Emirates yesterday. In the end, but it was the very end, they took three points when Alex Song's diving header ended West Ham's hopes.
Arsenal needed it. Yesterday's win moved them closest to Chelsea and perhaps closer to a legitimate title challenge.
"I believe we have a good chance but we want to show consistency first," Arsene Wenger said after the game. "We still need to step up a gear. But there is more to come from this team. We have potential on the bench and we have more players to come back."
Conventional wisdom says that Arsenal can only play one way but they have found several ways of losing and many more of torturing Wenger.
They can seem casual against the smaller teams, they can be beaten up by the more physical and over-powered by the mightier. However it happens, on the sideline, Wenger must manage his frustration.
West Ham's intentions were clear early on. They were going to defend deeply and aggressively and try and break occasionally. Mark Noble and Scott Parker set the standard for their team-mates to follow. The pair competed for everything in midfield.
Visiting manager Avram Grant naturally saw positives and insisted that he could take West Ham off the bottom of the table. "Even if we were in this position in April, it wouldn't be the end of the world," he said.
West Ham will need Robert Green in this form. He made several fine saves. When Arsenal got past him, they hit the woodwork, Song clipping the bar in the first half, Theo Walcott hitting the post in the second.
If Arsenal were subdued in the first half, the second was intense. It began with Parker making a hefty but fair challenge on Denilson which wasn't penalised. Moments later, when Parker fouled Marouane Chamakh, the Arsenal players and Wenger complained that Parker should surely now be booked for repeated fouling. They had forgotten that the first tackle was only a foul in their minds.
While Herita Ilunga had been booked for West Ham, the man most in danger of being sent off was Song, whose competitive first-half performance eventually saw him pick up a booking, which allowed West Ham to create chances from setpieces.
Arsenal's sense of grievance also created a sense of urgency. There was an astonishing passage of play with West Ham camped on their 18-yard line but at the end of it, Arsenal still hadn't scored.
They had appealed for handball when Parker blocked a shot with his head, Samir Nasri rattled the crossbar and Andrey Arshavin took a dive in search of a penalty. None of it led to an Arsenal goal.
West Ham got deeper and Wenger sent on Walcott. He came closest when he raced onto a precision Cesc Fabregas pass and side-footed the ball past Green. But the ball hit the inside of the far post and bounced back into Green's hands. Arshavin's afternoon had gone steadily downhill and he was taken off for the final 10 minutes, replaced by Nicklas Bendtner.
Green, again, kept West Ham in it when he tipped wide a Walcott shot that had taken a couple of deflections along the way. He then saved from Fabregas as West Ham tried to hang on in the final minutes.
Song had stayed on the pitch which was just as well. He had brought personality to the side all afternoon and Arsenal need his presence.
With two minutes to go, Song showed how much they needed him. At the end of a patient Arsenal move, he played the ball wide to Gael Clichy who had abandoned all defensive duties. Clichy cut inside and delivered a chipped ball with his right foot towards West Ham's far post. Bendtner and Song both went for it.
Bendtner led with his foot and missed. Song dived behind him and headed in. West Ham claimed offside, which was a desperate claim.
Arsenal had some desperate moments of their own in the final minutes. West Ham posed little threat but Arsenal have many scars.
"It is a relief. When you win with two minutes to go it is always a relief," Wenger said. It's a feeling he's got used to in charge of this side.