Lucas Perez scored his first Premier League goals for West Ham to fire them to a 3-1 victory over Cardiff.
The summer signing from Arsenal, who came on as a substitute for the injured Marko Arnautovic, found the net twice as the Hammers recorded back-to-back top-flight wins for the first time in almost two years.
Cardiff, still without an away win this season, blew a golden chance to take the lead when Joe Ralls missed a first half penalty.
And Perez punished them after the break with a quickfire double before Michail Antonio also opened his Premier League account for the season.
With injuries beginning to bite in defence for West Ham, winger Antonio had to start at right-back, a position previous boss Slaven Bilic had unsuccessfully tried him in.
Certainly Antonio was in no mood to curb his attacking instincts and planted an early header wide from a Robert Snodgrass free-kick.
Snodgrass and Felipe Anderson had shots deflected wide as West Ham, seemingly playing with six forwards, swarmed around the Cardiff penalty area.
Anderson then found Arnautovic with a delicious through-ball but the Austrian’s attempted lob landed safely in the arms of City keeper Neil Etheridge.
Arnautovic thought he had opened the scoring in the 24th minute when he surged into the area and fired across Etheridge, but Sean Morrison got back in time to hack the ball off the line.
Yet West Ham almost paid the price for failing to make their dominance count when, first, Joe Bennett’s cross was almost turned into his own net by Ogbonna.
Moments later Arnautovic shoved Junior Hoillett over in the area to concede a soft penalty, but Hammers keeper Lukasz Fabianski guessed correctly, diving to his left to keep out Ralls’ spot-kick.
Arnautovic’s match came to a premature end with what appeared to be a hamstring injury, a potentially major blow for the hosts amidst a hectic December schedule.
Yet although Perez has endured a tough start to life in east London following his summer switch from Arsenal, he made up for the loss of Arnautovic within four minutes of the restart.
Bennett and Morrison had two stabs at heading the ball clear on the edge of the area and when neither could manage it, Snodgrass controlled it on his chest before flicking it through to Perez.
The Spaniard lashed the ball past a helpless Etheridge for his first Premier League goal since January 2017.
And within five minutes Perez had his second, beating Etheridge at his near post after being slipped in by Arthur Masuaku.
Antonio helped himself to the third when he nodded in a Snodgrass corner on the hour before Cardiff scored the scrappiest of consolation goals in stoppage time through Josh Murphy.