South Africa’s Aiden Markram says Sri Lanka’s stunning upset of England will inspire his side’s bid to avoid being eliminated from the World Cup.

The struggling Proteas face Pakistan in a must-win clash at Lord’s on Sunday after winning just one of their first six group games.

With their troubled World Cup campaign facing a do-or-die moment, Markram revealed Sri Lanka’s shock 20-run win over the hosts this week has revived South Africa’s spirits.

“It’s definitely inspirational,” Markram told reporters on Saturday. “It’s nice to see that a team like Sri Lanka with great players, and maybe have been struggling for form, as have we, have been able to overcome one of the favourites.”

Sri Lanka defended a modest 233-run target against a powerful England batting line-up, with veteran fast bowler Lasith Malinga taking four wickets.

Markram said the result proves any team can win on their day.

“It was a great game of cricket, and it just proves that as soon as a team clicks on the day, any team at this World Cup can beat any other team,” Markram said.

“That’s why I say we really kind of focus on ourselves because if we put together our best game of cricket, it should put us in a good position to hopefully win games.”

While the Sri Lanka win showed anything can happen in the World Cup, Markram conceded South Africa have to play much better to have any chance of advancing.

South Africa need to win all three of their remaining game, while other results must also go their way to make the last four.

“We can definitely take a bit of learning from that,” said Markram who has managed just 99 runs in four World Cup innings. “But a lot of the focus is on us really trying to put our best game of cricket together to see how far it can take us.”

Markram claimed South Africa have never felt down and out despite their disappointing run, which featured a dramatic last over loss to New Zealand in their previous match.

“We definitely never feel done and out,” said Markram. “We’ve sort of tried to put a lot of focus back completely on to us going forward.

“It’s obviously really important that we win the remaining three games, and if there’s outside chance of qualifying, that would be incredible.

“But the only way we’re going to do that is by winning the next three games.”