Riyad Mahrez missed Manchester City's Community Shield triumph over Liverpool to avoid the risk of failing a doping test, manager Pep Guardiola said.

The Algeria international told Guardiola he was ready to play at Wembley on Sunday despite having only recently returned from Africa Cup of Nations glory in Egypt.

However, the winger was not named in the City squad as he took some medicine for an illness and club doctors could not be certain whether he had inadvertently ingested any banned substances.

Guardiola expects Mahrez to be available when City begin their Premier League title defence against West Ham on Saturday.

"Riyad called me right after being champions with Algeria and told me he wanted to come back in 10 days and play against Liverpool. I said he was more than welcome!" Guardiola told a news conference.

"But we don't know what he took, the medicine, and that's why today doping control was a risk. The doctors didn't [know], so that's why he didn't play.

"A guy who rested less, but could have played some minutes, but we could not take a risk because the doctors didn't have exactly the medicines or what happened, and we did not want to take a risk.

"Hopefully, next game against West Ham and the future, everything will be normal."

City won the Community Shield 5-4 on penalties after a 1-1 draw in London.

Raheem Sterling's goal was cancelled out in normal time by Joel Matip, but Claudio Bravo saved Georginio Wijnaldum's spot-kick to secure the trophy.