RICHARD Pryor was one of those rare comedians who were not only very funny but also had a genuine impact on popular culture and society, forcing audiences to think about themselves, their lives and their attitudes.

There was a time when Pryor wanted nothing more than to be like Bill Cosby. But while Cosby toned his comedy down for a mainstream, white audience, Pryor remained very much his own man, never letting anyone forget he was "one crazy nigger".

Being black was only part of it - albeit a vital part. It was not just racial prejudice with which Pryor had to come to terms.

His life story reads like a wild melodrama, from growing up in the family brothel in Illinois to super stardom in Hollywood and battles with drink, drugs and women, and finally to his death from a heart attack in Los Angeles at the age of 65. Like a black Billy Connolly, he used his life as the raw material for his act - and, like Connolly, some of that material was very raw. Perhaps he also used his act as therapy to try to come to terms with his life.

He summed up his philosophy on stand-up comedy by saying: "You can do anything you want and you can say anything that comes to mind - just so long as it's funny. If you ain't funny, then get the f*** off the stage."

Undoubtedly, he influenced a generation of comedians and comic actors, black and white, including Eddie Murphy and Robin Williams.

Despite the swearing and the wild, manic turns, there was a gentle, vulnerable side to Pryor, best seen in his films with Gene Wilder, particularly Stir Crazy (1980) in which they played two hapless jailbirds, like an updated spin on Laurel and Hardy, ill-prepared for incarceration in a tough western jail.

Ultimately, Pryor did appeal to a huge, mainstream audience. Stir Crazy was a major hit and by 1982 Pryor was rated America's fifth top boxoffice star, ahead of Harrison Ford, and the dollars-4m fee he received for playing the villain in Superman III (1983) set a record for a black actor.

Born in Peoria, Illinois, in 1940, Richard Franklin Lennox Thomas Pryor grew up in one of the family's chain of whorehouses. They catered for black entertainers, from whom he picked up a passion both for comedy and jazz.

He hung around clubs and got the chance to play drums with professional musicians. Later, the rhythm of his comedy routines was to invite comparisons with some of the jazz greats. By his midteens, he was already a father, he had a stint in the army and headed for New York to work as a comic.

Black comics were beginning to appeal to a wider, white audience. Historian Mel Wat-kins noted in his book On the Real Side (1995): "African Americans were accepted as clowns and jesters but were expected to avoid satire and social commentary - the comedy of ideas."

By the mid-sixties, Pryorwas a regular on the Ed Sullivan show but later talked of having an epiphany during a show in Las Vegas, when he walked off in the middle of his act and determined that, in future, he had to tell "the truth".

He had also been appearing in films since the mid-sixties and had a small role as a musician in the Billie Holiday biopic Lady Sings the Blues (1972).

However, his increasingly controversial image seemingly cost him the starring role of the sheriff in the comedy western classic Blazing Saddles (1974), on which he was one of the writers. The film did, nevertheless, lay the foundations of his comic partnership with Gene Wilder, who also served as a writer on the film, as well as appearing in it.

Pryor made a huge impact when he hosted the TV revue show Saturday Night Live in 1975, forcing NBC to introduce a few seconds' delay between performance and broadcast to allow for censorship.

He played the preacher Daddy Rich in the hit film Car Wash (1976) and had his own short-lived series, The Richard Pryor Show, in 1977. It gave Robin Williams an early break and its cancellation simply fuelled Pryor's subversive comic legend.

Silver Streak (1976) was the first of four films in which he co-starred with Gene Wilder. A comic variation on Hitchcock, it had them on a train and on the run from police and villains. It was followed by Stir Crazy, then See No Evil, Hear No Evil (1989), in which Wilder was deaf and Pryor blind, and AnotherYou (1991), their weakest film, with Wilder as an ex-mental patient and Pryor a con-man.

Pryor's screen career took off in the late seventies and he starred in Greased Lightning (1977), Blue Collar (1978), The Wiz (1978), the starry black remake of The Wizard of Oz, in which he played the title character, California Suite (1978), with Bill Cosby, and In God We Trust (1980), in which he had the title role.

Richard Pryor Live in Concert (1979) was one of several films of his stand-up act. There were also numerous records: between 1974 and 1982, he won Grammy awards for That Nigger's Crazy, Is It Something I Said? , Bicentennial Nigger, Rev Du Rite and Live on the Sunset Strip. Throughout this period, he went through drink, drugs, wives and lovers like most people go through socks. There were several brushes with the law and, in 1978, he fired a gun repeatedly in the general direction of one of his ex-wives. His aim was seemingly impaired by drugs and he later joked he had killed her car.

In 1980, it was reported he had almost died after accidentally setting fire to himself while taking cocaine. He suggested in his autobiography Pryor Convictions and Other Life Sentences (1995) the story was fabricated by his managers and that he had been trying to kill himself. However, even by his own later account, he had been taking cocaine for several days, before drenching himself in brandy and setting it on fire, which would suggest he was not exactly thinking straight.

He starred in The Toy (1982), Brewster's Millions (1985) and Harlem Nights (1989), with Eddie Murphy. But, as with so many talented comedians, the discipline and structure of cinema sometimes constrained his anarchic talents. In 1986, he was diagnosed with multiple sclerosis and the condition curtailed his lifestyle and career.

He is survived by his wife and by seven children. He had remarried Jennifer in 2001, after an earlier, brief marriage in the early eighties.

Last year, he came top in an American poll to determine the 100 greatest stand-up comedians of all time.

Richard Pryor, comedian and actor; born December 1, 1940, died December 10, 2005.