Match ends, West Ham United 1, Manchester City 3.
Sergio Aguero scored twice as Manchester City saw off West Ham to go fourth in the Premier League.
City tore through the middle of the Hammers' defence for their opener, with Alvaro Negredo leaving Fernandinho's pass for Aguero to calmly slot home.
Aguero made it 2-0 with a header from David Silva's free-kick but Vaz Te replied with an acrobatic strike.
That set up a tense finish, until Silva found the top corner to seal City's first away league win of the season.
City's form on the road has been the biggest concern for new manager Manuel Pellegrini this season, and they badly needed a solid display in the first of four successive away games in the league, Champions League and League Cup.
They began strongly in east London, establishing a platform in midfield and controlling that area of the pitch.
West Ham were chasing shadows and City's slick movement and passing saw them take an early lead through Aguero, who galloped clear unopposed after 16 minutes.
That was only the second goal West Ham have conceded in open play in the Premier League this season, but Sam Allardyce's side were looking vulnerable every time City came at them.
Aguero made space for another shot that just eluded Silva after squirming out of Jussi Jaaskelainen's grasp, while the Hammers keeper did well to keep out a curling Yaya Toure shot after a mistake by Winston Reid.
The home side, who were again operating without an out-and-out striker, did enjoy spells of pressure too but they lacked a cutting edge when they put the ball into the box and ended the first half without managing a shot on target.
Things got bleaker for West Ham after the break when Aguero met Silva's free-kick with a pin-point near-post header - his first in the Premier League - to double City's lead.
But the Hammers responded with their best spell of the match, culminating with Vaz Te's overhead kick after Ravel Morrison had hooked the ball back into the danger zone.
City had gone ahead in both of their away Premier League defeats this season, and their lead looked fragile again as West Ham bombarded their box with crosses and free-kicks.
This time, however, there was a different outcome.
In contrast to their displays in defeats at Cardiff and Aston Villa, Pellegrini's side kept their defensive discipline, and got their reward at the other end too.
Negredo could have settled City's nerves when he slammed an angled shot against the underside of the bar, while Jaaskelainen had to be alert to keep out efforts from Aguero and Aleksandar Kolarov.
Instead it was down to Silva to put the game beyond West Ham's reach.
He met Aguero's clever backheel on the edge of the area to curl an unstoppable shot into the top corner and ensure City embark on their next trip, to CSKA Moscow in the Champions League on Wednesday, on the back of a win.
West Ham boss Sam Allardyce: "City were very, very good. Because they were so good we could not get near our best.
"The lads had a right go after going 2-0 down. Before that, we were nowhere near our best. We had to be at our best, and they had to have an off day, for us to beat them.
"For the size, power and money they have, we could not live with them today. It showed at times.
"We could have felt sorry for ourselves and lost 4-0, but we made a spirited comeback. We did not find the form we had at Tottenham.
"It did not work today. The lads did not apply themselves as well."
Manchester City manager Manuel Pellegrini: "Winning the game was the most important thing for us. We played very well, and the best player for West Ham was their goalkeeper.
"We played as well as we did against Aston Villa [when City lost 3-2]. Someone asked me if I needed to change the way we played away, and I do not think so.
"This team should always play in attacking way because of the players we have.
"We were absolutely sure playing the way we were, we would win away. We lost against Cardiff and Aston Villa, but football is like that."
- 20DemelSubstituted forO'Brienat 65'minutes
- 4NolanBooked at 33minsSubstituted forPetricat 83'minutes
- 12Vaz TeSubstituted forJarvisat 65'minutes
- 22ClichyBooked at 63mins
- 14García Fernández
- 42Y Touré
- 21SilvaBooked at 26mins
- 8NasriSubstituted forMilnerat 74'minutes
- 16AgüeroSubstituted forJoveticat 82'minutes
- 9NegredoSubstituted forKolarovat 66'minutes
- Michael Oliver
- Shots on Target
Second Half ends, West Ham United 1, Manchester City 3.
Foul by David Silva (Manchester City).
Mohamed Diamé (West Ham United) wins a free kick in the defensive half.
Attempt missed. Ravel Morrison (West Ham United) right footed shot from outside the box is high and wide to the right. Assisted by Matthew Jarvis.
Foul by James Milner (Manchester City).
Mladen Petric (West Ham United) wins a free kick in the attacking half.
Aleksandar Kolarov (Manchester City) wins a free kick in the attacking half.
Foul by Joey O'Brien (West Ham United).
Foul by Fernandinho (Manchester City).
Ravel Morrison (West Ham United) wins a free kick in the attacking half.
Foul by Aleksandar Kolarov (Manchester City).
Ravel Morrison (West Ham United) wins a free kick on the right wing.
Substitution, West Ham United. Mladen Petric replaces Kevin Nolan.
Substitution, Manchester City. Stevan Jovetic replaces Sergio Agüero.
Goal! West Ham United 1, Manchester City 3. David Silva (Manchester City) left footed shot from the centre of the box to the top left corner. Assisted by Sergio Agüero.
Attempt blocked. Yaya Touré (Manchester City) left footed shot from the right side of the box is blocked. Assisted by James Milner.
Attempt blocked. Winston Reid (West Ham United) header from the left side of the box is blocked. Assisted by Stewart Downing with a cross.
Corner, West Ham United. Conceded by Gaël Clichy.
Substitution, Manchester City. James Milner replaces Samir Nasri.