In the second greatest story cricket has conceived only one man emerged with his dignity intact: Basil D'Oliveira, who died on Saturday morning at the age of 80.

At Newlands in Cape Town the South Africa players donned their black armbands as they continued their Test against Australia. D'Oliveira is a hero there now. But more than half a century ago, when he was denied the opportunity to show the world that he was one of the great all-rounders, he might have been in those Newlands stands supporting South Africa's opponents. That was common practice among the coloured community when the South Africa team D'Oliveira watched as a youngster were in action.

D'Oliveira, whose polite, self-effacing persona hid a tungsten-tough resolve, was the unwitting catalyst in South Africa's sporting isolation in the 70s. And we know now how much sporting isolation really hurt and hastened the dismantling of apartheid. In some ways the ramifications of the D'Oliveira affair outstrip those of Bodyline, which may be regarded as cricket's greatest drama.

Until 27 August 1968, the day on which the England selectors picked the touring party for the forthcoming expedition to South Africa, there had been a fairytale element to D'Oliveira's life. In Cape Town he learned his skill on dirt tracks converted into cricket pitches, thinking nothing of walking 10 miles to play.

He dominated cricket in the coloured community, once hitting 225 in 70 minutes and 46 runs from an eight-ball over. In 1959 he wrote to John Arlott in green ink on cheap, lined paper, pleading for a job in England. Arlott was a good choice for he was rare among English cricketing press then: he abhorred apartheid, he was prepared to speak out against it and had a passion for cricketers.

In 1960, Arlott, along with John Kay, the cricket correspondent of the Manchester Evening News, persuaded Middleton CC to engage D'Oliveira as their professional in the Lancashire League, for a modest sum. Back in South Africa raffles, fetes and matches were organised to raise money for his fare to England.

Upon his arrival at the airport in London, Kay found a bewildered D'Oliveira in Immigration, where he had been looking for the queue marked blacks and coloureds. After a hesitant start in a foreign land D'Oliveira's performances in the League rivalled those of Garry Sobers, acknowledged to be the greatest all‑rounder in the world at the time.

Middleton CC might have provided the zenith of his career. However, three years later D'Oliveira toured with a team of county and international cricketers; in Nairobi he hit a century in 60 minutes and some important eyebrows were raised, such as those of Everton Weekes, scorer of 15 Test centuries for West Indies, and Tom Graveney, who was on his way to making 11 tons for England.

Graveney convinced D'Oliveira that he was good enough to play county cricket for Worcestershire. In 1964, having been economical with the truth about his age (he was 32, but he lopped off three years) D'Oliveira served his period of qualification; in 1965 he played regularly for the county, scoring 1,523 runs and taking 35 wickets as Worcestershire won the Championship; in 1966 he was selected for England against West Indies.

He became an England regular immediately. Only on the tour of the West Indies in 1967-68 did his performances wane. By his own admission he drank too much and he was not adept with alcohol. He had never tasted any until celebrating Weekes's birthday on the tour he undertook in 1962.

Moreover, the following winter tour was already on his mind. England were scheduled to play in South Africa and he was desperate to be part of that team. So the summer of 1968 was a tortuous one for D'Oliveira – and an incomprehensible one for those trying to unravel what was going on among the establishment of English cricket, who all resided within the portals of the Lord's pavilion.

Australia were touring and in the first Test defeated England by 159 runs. D'Oliveira scored 87 not out in the second innings and took two for 45 from 32 overs – and was dropped. Bemused, he returned to county cricket and performed moderately. But when Roger Prideaux, an opening batsman, withdrew from the final Test with a "viral infection", D'Oliveira was recalled (Prideaux later acknowledged that he could have played but he was keen to protect his tour place by avoiding failure at The Oval).

D'Oliveira produced one of the great innings, not because the bowling was deadly or the pitch full of demons. He knew he was playing to fulfil his dream of returning to South Africa as an England cricketer. He hit 158. "You've put the cat among the pigeons now", said the umpire Charlie Elliott as D'Oliveira passed three figures.

After a thunderstorm England won that Test in the last minute, D'Oliveira having made an important breakthrough on the final afternoon by dismissing the obdurate Barry Jarman. That evening the selectors, which included the captain, Colin Cowdrey, met at Lord's to choose the tour party to South Africa. Incredibly, D'Oliveira was not among the 16 selected.

The selectors protested that this was a purely cricketing decision. But no one really believed them. At Worcester upon hearing the news, D'Oliveira broke down in tears as Graveney tried to console him. Cowdrey's wife sent flowers to the D'Oliveira household. There was a public outcry but the cricketing establishment, including the majority of the press corps, closed ranks.

D'Oliveira retained a dignified silence, expressing only "deep disappointment". Then, after Tom Cartwright's withdrawal, D'Oliveira was chosen as a replacement. Within 24 hours South Africa's prime minister, John Vorster, deplored his selection, saying: "It is not the MCC team. It's the team of the anti-apartheid movement." The tour was off. In the space of a week the Marylebone Cricket Club, then responsible for picking England's touring sides, had contrived to enrage the liberals at home and the diehard supporters of apartheid in South Africa. Eighteen months later, after much anguish, South Africa's tour to England was cancelled. Only D'Oliveira emerged with credit in this saga.

Back on a cricket field he kept playing for England until 1972 and for Worcestershire until 1980, when he was 48 years of age. I was lucky enough to play against him towards the end and recall the head so still, the minimal backlift and the amazing power generated from his forearms. On the county circuit there was awe at the way D'Oliveira, often in harness with Graveney, would combat spinners on rain-affected pitches. Graveney would rock on to the front foot to dispatch them. D'Oliveira would do the opposite by staying deep in the crease and playing impossibly late. Together they offered rare and contrasting masterclasses.

After giving up as a player D'Oliveira coached at Worcester until his retirement, an avuncular figure, happy to pass on his wisdom to both his own team and to visitors to New Road. His son Damian played for Worcestershire for 13 years; his grandson, Brett, a leg-spinner, signed for the club in August. Thus there is a happy legacy at Worcester in surroundings so distant from those where D'Oliveira learned his cricket. Recently there was a memorial surface for Graham Dilley at Worcester Cathedral; the pews were packed. For D'Oliveira one suspects that there will not be enough pews.

And he leaves a wider legacy. This unassuming man, who made no enemies on a cricket field, who instinctively shrunk from the spotlight, yet who might have been regarded as one of the greatest all-rounders of all time if he had come to England a decade earlier, unwittingly brought the injustice of apartheid to a wider public. He was no politician. But he achieved far more than most of them.

In Peter Oborne's excellent book Basil D'Oliveira. Cricket and Conspiracy: The Untold Story the author tells us how D'Oliveira was invited to lunch by Nelson Mandela a few years ago after a coaching trip to South Africa. Oborne describes their parting. "At the end Mandela rose from his chair and hugged D'Oliveira. "Thanks for coming, Basil", he said. "You must go home now. You've done your bit."