Moeen Ali provided the bulk of the runs and two crucial wickets which kept England marginally on top after day two of the Ashes in Cardiff.

Moeen (77) figured in an eighth-wicket stand of 52 which helped the hosts to 430 all out - and then, although he drew a blank against Chris Rogers (95), saw off Australia's world number one batsman Steve Smith and captain Michael Clarke as the tourists reached 264 for five.

Without his all-round efforts, England might instead have fallen off the pace on a day which proved painful for captain Alastair Cook.

His physical discomfort came with a nasty blow in early afternoon at slip, when he was hit near the groin and left writhing on the ground for several minutes before a few more off the pitch in recovery.

Rogers administered most of Cook and England's mental anguish, passing his seventh successive half-century to equal the all-time Test record sequence.

Apart from the wickets of David Warner and Smith, England's only light moment of the middle session came in the shape of Joe Root's amusement at Cook's transient plight - before he had to take over the captaincy for a time, to little avail.

Rogers was unfazed throughout, first with Warner until his opening partner was well caught by Cook - diving high to his right at first slip, off an attempted drive at James Anderson.

There was nothing more for England to smile about until Smith, who had taken a previous liking to Moeen's off spin, got himself in a terrible tangle up the pitch to the same bowler and somehow poked a catch off a leading edge straight to Cook at short mid-on.

England could still not crack the code with Rogers, however - and having dealt undemonstratively but most effectively with all the home attack could muster, and for good measure hitting the only six of his Test career when he just cleared Moeen with a mishook at Stuart Broad, the left-hander was within five runs of his fourth Ashes century when he at last made a costly mistake.

It came against Mark Wood, angling the ball across him as Rogers edged behind attacking on the back foot - ending a third consecutive half-century stand.

Clarke continued to appear in control but, like Smith before him, was defeated in the air by Moeen and well held when he crunched back a sharp return catch.

England's stock was high then. But after a fourth 50-plus stand, they were indebted to a loose shot from Adam Voges - mistiming a catch to cover off Ben Stokes - to keep their noses in front.

England were also thankful for Moeen's runs as 87 were added for their last three wickets in the first 80 minutes of a sunny day.

Broad contributed an eventful tail-end innings which included two fours and a pulled six off Josh Hazlewood but also several unnerving moments against the short ball.

There was a curiosity piece too when he fended Mitchell Johnson off from round the wicket and was initially given out by Marais Erasmus caught by short-leg Voges, diving almost into the batsman's crease.

Only when Broad was almost off the pitch did it transpire third umpire Chris Gaffaney was not so sure - and eventually ruled the ball had touched the ground as well as Voges' outstretched fingers.

There was no addition to the total of 362 when, in the next over, Moeen edged a full-length ball from Mitchell Starc behind yet was reprieved after Australia declined to appeal.

The partnership accrued another 32 before Broad was caught-behind aiming a slog-sweep at the first sight of spin from Nathan Lyon.

Still, nothing was going right for Johnson - who ended up with his worst Test figures of nought for 111 and was rewarded with his share of 'interaction' from a partisan crowd.

It was Starc who eventually eked out the final two wickets, most importantly Moeen's when he edged an attempted drive to Shane Watson at slip, as the left-armer finished with five for 114.