Sri Lanka's Mahela Jayawardene insists that mental toughness was the key behind his century that helped his country beat Afghanistan by four wickets at the ICC World Cup.