LONDON — Arsenal did just enough to get a first Premier League win under new manager Unai Emery at the third attempt.

The Gunners came from behind to beat West Ham 3-1 on Saturday, with the help of a fortuitous own-goal.

West Ham opened the scoring after Felipe Anderson and Marko Arnautovic exchanged passes down the left before Austria striker Arnautovic unleashed a 20-yard shot that beat Arsenal goalkeeper Petr Cech in the 25th minute.

The visitors' lead didn't last long after right back Hector Bellerin broke free from West Ham's defence and ran toward the byline. Bellerin whipped in a cross that flew by several Arsenal players right in front of goal, but the ball fell to unmarked left back Nacho Monreal who slammed it past West Ham keeper Lukasz Fabianski in the 30th.

Arsenal got some good fortune in the 70th when West Ham failed to clear the ball and Aaron Ramsey headed it back into the area. The ball fell to substitute Alexandre Lacazette whose attempted cross ricocheted off West Ham defender Issa Diop's chest and in for an own-goal.

It was just the bit of luck that Emery was searching for as Arsenal struggled to control the game for long stretches.

Substitute Danny Welbeck sealed the victory in stoppage time, when Bellerin found him unmarked in the area. Welbeck was able to turn and spin before he struck, with Fabianski having little chance.

Arsenal lost its first two matches this season, albeit to tough opponents Manchester City and Chelsea, and questions were already being asked if the new manager was good enough to motivate his players.

Emery is hoping his players grow accustomed to a new possession-based system, but the Gunners have had a hard time adapting after the Spaniard took over from Arsene Wenger.

Arsenal frequently gave the ball away as the team tried to build play from the back at Emirates Stadium.

But as soon as Arsenal went ahead, the team seemed more at ease, bounding forward with the free-flowing football of old that Arsenal used to be known for.

West Ham slumped to a third consecutive defeat under new manager Manuel Pellegrini.