West Ham United booked a place in the last eight of the Carabao Cup at the expense of Arsenal to ensure an unhappy homecoming to east London for former captain Declan Rice.

Rice had lifted the Europa Conference League trophy in his 245th and final appearance for the Hammers in Prague in June, before joining the Gunners in a £105million deal.

But he was left out of the Gunners starting line-up on his first return to London Stadium, as Mikel Arteta made six changes to the side that had beaten Sheffield United 5-0 at the weekend.

Aaron Ramsdale replaced David Raya in goal, while Gabriel came in for William Saliba in defence, as Fabio Vieira and Jorginho were given midfield berths in place of Emile Smith Rowe and Rice.

Reiss Nelson and Leandro Trossard, meanwhile, were asked to flank weekend hat-trick hero Eddie Nketiah as Bukayo Saka and Gabriel Martinelli also took seats on the sidelines.

Hammers boss Moyes, with only four wins from 41 previous meetings with the Gunners, shuffled his pack accordingly too after defeat against Everton - his club's third loss in succession - with five changes of his own.

Lukasz Fabianski came in for Alphonse Areola to face his old club, as another ex-Gunner Dinos Mavropanos and Emerson were named among the back four in place of Kurt Zouma and Aaron Cresswell.

And Tomas Soucek - the Hammers matchwinner at Lincoln City in the previous round - and Said Benrahma were also brought in, for James Ward-Prowse and Michail Antonio, respectively.

The Gunners were quickly into their smooth passing game, before Lucas Paqueta got a chance to break on the right in the fifth minute, only to overhit his pass for Jarrod Bowen.

Nelson then did well to collect Ben White's chipped pass and get to the byline on the right, but his cutback was cut out by Mavropanos, who was fouled in the process.

And Fabianski had to tip over a glancing header from Kai Havertz, when Nelson whipped in a free-kick from the left, which had been given for a foul on the German by Edson Alvarez in the eighth minute.

Good pressing by Mohammed Kudus won the hosts a throw-in which Vladimir Coufal hurled long into the box, but when that was cleared, Nelson ran fully 60 yards upfield before being stopped by Benrahma, who had tracked back well.

Then a long ball into the box was headed behind by Gabriel, under yet more pressure from Kudus, and when Bowen swung in a left-footed corner, the ball glanced off the peroxide white head of White and into his own net.

Ramsdale confronted referee Simon Hooper, claiming his shirt had been pulled by Soucek, and a check of the replay might have seen it chalked off. But without VAR to call upon on this occasion, the goal was allowed to stand.

The 16th-minute opener enlivened the home crowd, before White's looping header from a free-kick was palmed over by Fabianski midway through the half and Nketiah's near-post header from the resulting corner flew just wide.

Rice received a mixture of polite applause and a few boos as he began to warm up, before the claret and blue hordes were cheering a charging run by Greek centre-back Mavropanos to win a corner.

Alvarez flicked on Bowen's centre this time, with Soucek crashing into Ramsdale as he punched clear, which led to an exchange of views. And good pressing by Bowen as Jakub Kiwior looked to play out from close to his own goal line had the home faithful raising the decibel levels once more.

Kudus then saw a crossfield pass picked off by Nelson on the half-hour mark, but his drive was deflected behind for an Arsenal corner, sent in by Fabio Vieria but headed wide of the far post by Havertz, beyond Kiwior and Trossard.

Nelson continued to look a threat on Arsenal's right, but the Gunners got a brief glimpse from the opposite flank on 38 minutes when Oleksandr Zinchenko - a four-time League Cup winner at Manchester City - hooked on Trossard's ball into the box and Nketiah lifted his shot over the crosssbar.

The second half was less than 30 seconds old, though, when the Hammers went close to doubling their advantage as Paqueta played in Bowen, after picking the pocket of Jorginho, only for Ramsdale to produce a fine save and White to clear the loose ball away from goal.

But the north Londoners did not heed the warning as Nayef Aguerd played a long diagonal ball out to the right, where Kudus showed great control to turn inside Zinchenko and fired through the legs of Gabriel, past Ramsdale and inside the far post to make it 2-0.

Havertz dragged a low ball across the face of goal as the visitors looked for a quick response, but then Emerson saw a dangerous cross cut out as Paqueta began to showcase some of his great control for the hosts.

Rice was greeted by more booing by some home supporters as he was sent on by Arteta, along with Takihero Tomiyasu, for Jorginho and Zinchenko in a double switch just before the hour.

But he had been on the field he used to call home less than three minutes when Bowen, West Ham's memorable matchwinner in the Czech Republic, drilled a left-footed shot past Ramsdale, with the help of a slight deflection off the thigh of Kiwior for the third.

Martinelli and Saka were sent on for Trossard and Nelson with a quarter of the game remaining, but the Hammers were in no mood to pass up this opportunity, with Rice having his every touch audibly noted by the home fans.

Captain Martin Odegaard also made a late appearance off the bench for the visitors, forcing Fabianski into a save with a dipping drive in the closing stages and sending a free-kick into West Ham's defensive wall before drilling a last-gasp consolation in off a post.

And while Moyes' men make a short trip west to Brentford for their next Premier League test on Saturday, Arteta must get his title hopefuls quickly back up to speed for the long journey to the north-east England and a notable test at Newcastle.

West Ham United: Fabianski, Coufal, Mavropanos, Aguerd, Emerson, Soucek, Alvarez, Kudus (Kehrer 88), Benrahma (Ward-Prowse 81), Paqueta, Bowen.
Unused subs: Cresswell, Fornals, Antonio, Cornet, Ings, Ogbonna, Areola.

Arsenal: Ramsdale, White, Kiwior, Gabriel, Zinchenko (Tomiyasu 57), Fabio Vieira, Jorginho (Rice 57), Havertz, Nelson (Saka 66), Nketiah (Odegaard 80), Trossard (Martinelli 66). Unused subs: Saliba, Cedric Soares, Elneny, Hein.