Williams, who enjoyed success in the South Wales derby against Cardiff during his time as Swansea City head coach, made four changes from Peterborough’s League One defeat to Blackpool last time out.

Cardiff head coach Brian Barry-Murphy also made four changes from the Bluebirds’ side which knocked Wrexham out of the EFL Cup on Tuesday to reach the quarter-finals.

The Bluebirds ran out 2-1 winners when the sides met on the opening day of the League One season, but they were on the back foot from the off at London Road.

The hosts should have taken the lead in the first minute, when Kyrell Lisbie’s cross was met by Leonard, but the Posh striker missed from six yards out.

Alex Robertson was almost left red-faced when he lost possession in the Cardiff box midway through the first half, but Morgan’s resulting shot was deflected wide by the returning Dylan Lawlor.

Cardiff’s best chance of the game fell to Callum Robinson after a poor clearing kick from Bass went straight to the Bluebirds striker, but his effort was straight at the Posh goalkeeper who was way off his line.

The miss proved crucial, as with half-time approaching Morgan’s driving run and shot was kindly deflected into the path of Leonard, who made no mistake this time to score his first goal for the club.

Cardiff pushed forward in search of an equaliser after the break, but failed to carve out any clear-cut chances, though Cian Ashford did force a save from Bass at the near post after nice build-up play from Rubin Colwill.

At the other end, Peterborough substitute Brandon Khela had the chance to double the hosts’ lead, but he could not direct his free header on target from Peter Kioso’s cross.

Cardiff goalkeeper Trott had the chance to write his own slice of FA Cup history as the ball fell to his feet in the Peterborough box when up for a last-minute corner, but he could not find the target as the full-time whistle went.