Peter Sellers, the gifted British mimic and comic actor who delighted Anglo-American radio audiences as a founding zany of the BBC's "Goon Show" and later achieved international popularity as a film star -- notably for sustaining the character of Inspector Clouseau, a pompous, bumbling French police detective, through five successful movies -- died yesterday at London's Middlesex Hospital after a heart attack. He was 54.

Mr. Sellers had narrowly survived heart seizures in 1964 and 1977. While working on a film in Hollywood, Mr. Sellers was stricken with a massive coronary thrombosis in April 1964, and was rushed to Cedars of Lebanon Hospital. There, emergency treatment succeeded in reviving his heart on six separate occasions.

Following this remarkable recovery he resumed his screen-acting career, then at one of its high points, with apparently undiminished energy. Mr. Sellers had been fitted with a pacemaker; three years ago it was reported that he had suffered another attack when the device failed.

Mr. Sellers was in his suite at the Dorchester Hotel in London when he complained of chest pains on Tuesday. He was rushed to the hospital and underwent intensive resuscitation procedures after his heart stopped.

According to a statement issued by the hospital at 7:28 p.m. EDT yesterday, "It is with very great regret that we have to inform you that Mr. Sellers died. . . . His wife and children were at his side. Mr. Sellers' death was entirely due to natural causes. His heart just faded away."

Mr. Sellers' fourth wife, British actress Lynne Frederick, had flown to his bedside from Los Angeles earlier in the day. Mr. Sellers' second wife, Swedish actress Britt Ekland, had also arrived from Stockholm with their 15-year-old daughter Victoria.

The Sellers-Ekland marriage had ended in divorce in 1969. Ekland's account of their four-year union in a recent published autobiography had reportedly angered Mr. Sellers, who was characterized as a suspicious, impossible-to-please husband.

Mr. Sellers had two children by his first marriage to Australian actress Ann Hayes. His third wife was Miranda Quarry, the stepdaughter of a British peer. He also had been linked romantically with Sophia Loren and Liza Minnelli.

Blake Edwards, who directed several of Mr. Sellers' films, including all the 'Pink Panther' comedies, said, "I'm saddened because the world has lost a very big talent. One lived with the realization that Peter could go at any time because of his recurrent heart attacks, but it still comes as a blow."

Writer Joe Hyams, who had collaborated with Mr. Sellers on his autobiography, "Sellers' Market," recalled the late actor as "a very courageous man who refused to allow his heart problems to interfere with his professional life. He had a heart attack while we were doing the book, but when I visited him in the hospital, he wanted to get to work on the manuscript the very next day. When I told him he was too ill to work, Peter said 'Not at all. You have to live before you die, or you will die before you live.'"

Despite his fame and continuing popularity, Mr. Sellers was notoriously uncertain about his own talent and professional standing. "I haven't a clue who Peter Sellers is," he once remarked. "As far as I'm aware, I'm nothing. I have no personality of my own, whatsoever. I have no character to offer the public. I have nothing to project . . . To me, I am a complete stranger."

He went on to speculate that this vagueness of personality, a frequent source of criticism among British reviewers, may have inspired his considerable gifts for dialect and impersonation. "I could never be a real star," he contended. "I am a character actor. I couldn't play Peter Sellers -- the way Cary Grant plays Cary Grant, for instance -- because I have no concrete image of myself. But I could do one helluva Cary Grant."

Mr. Sellers was twice nominated for the Academy Award as best actor -- in 1965 for his triple role as the meek American president, the phlegmatic British officer and the crazed German rocket scientist in "Dr. Strangelove," Stanley Kubrick's satire about nuclear doomsday, and again this year for his portrayal of the simpleton who is mistaken for a savant in the droll political satire, "Being There."

Mr. Sellers won the 1959 British Film Academy Award as best actor for his impeccably deadpan characterization of a pompous trade union official in "I'm All Right, Jack." He appeared in 52 feature films, almost all of them comedies, in the course of a 30-year movie career. His most recent production, "The Fiendish Plot of Dr. Fu Manchu," is scheduled for national release within the next few weeks. Mr. Sellers had agreed to star in a sixth and final Inspector Clouseau comedy later this year.

Mr. Sellers was born on Sept. 8, 1925, in Southsea, Hampshire, England.

His parents, Bill and Peg Sellers, were vaudeville entertainers. Mr. Sellers' youth was spent backstage at music halls or in a succession of theatrical boarding schools. At the age of 17 he joined the Royal Air Force and entertained servicemen in India and the Middle East.

After the war he appeared as a stand-up comic at London's Windmill Theater and got his big break (allegedly aided by his own vocal impersonations of two other actors in phone calls to a producer, recommending himself for employment) when he joined Spike Milligan, Harry Secombe, and Michael Bentine as the original cast of "The Goon Show," a pace-setting BBC radio show for seven years.

Mr. Sellers' first film appearances were in wacky, off-the-cuff shorts made in collaboration with Milligan and Secombe. Several years later the team contrived to recapture the spirit of these amateur romps (and the spirit of "Goon Show" humor) in a widely seen short called "The Running, Jumping and Standing Still Film," directed by a relative unknown named Richard Lester, soon to be entrusted with the movie debut of the Beatles.

Mr. Sellers' first significant character acting role came in 1954 in the Alec Guinness comedy "The Ladykillers." Mr. Sellers played one of the members of Guiness' ill-fated robbery gang -- a rather lumpish obtuse youth named Lenny.

Subsequently, Mr. Sellers' career seemed to duplicate that of Guinness, whom he often cited in interviews as a model and inspiration. Moviegoers alert to British film comedy in its late '50s heyday were impressed by his performances as an aging projectionist in "The Smallest Show on Earth" and a fatuous emcee in "Your Past Is Showing" ("The Naked Truth" in England). However, the vehicle that put him over in a big way with the American public was a comedy that had been shrugged off in Britain -- a mild spoof of international power politics called "The Mouse That Roared."

The guinness connection was firmly established by the fact that Mr. Sellers played multiple roles in "The Mouse That Roared" -- a dowager, a Blimpish officer and an ingenious personable young diplomat. The earliest banner year for moviegoers who had discovered Peter Sellers was 1959: "The Mouse That Roared," Carlton-Browne of the F.O.," "Man in a Cocked Hat," "I'm All Right Jack" and "The Battle of the Sexes" were all in release.

His reputation continued to climb in the new decade. Despite an occasional miscalculation like "Mr. Topaze" (which he also directed) and "Waltz of the Toreadors," Mr. Sellers began creating a memorable gallery of comic performances in "The Millionairess," "Dolly Two Can Play," "Lolita," "Dr. Strangelove," "The World of Henry Orient" and the first two Clouseau comedies, "The Pink Panther" and "A Shot in the Dark."

His success continued to mystify some British critics. For example, David Thomson has written that "Sellers' British pictures [show him as] a dull character actor, chastened by the medium's distaste for darting in and out of different characters without revealing his own . . . To see him once . . . is to recognise an undisciplined, talented, but posturing actor."

On the favorable side, Pauline Kael testified to the inventive character actor that Americans seemed to respond to when she praised his performance as the insolent deceiver Clare Quilty in Kubrick's movie version of Vladimir Nabokov's "Lolita."

In Kael's estimation, "Peter Sellers works with miserable physical equipment, yet he has somehow managed to turn his lumbering, wide-hipped body into an advantage by acting to perfection the man without physical assets. The soft, slow-moving, paper-pushing middle-class man is his special self-effacing type, and though only in his mid-30s he all too easily incarnates sly, smug middle-aged man. Even his facial muscles are kept flaccid, so that he always look wary, too tired and cynical for much of a response . . . He does something that seems impossible: he makes unattractiveness magnetic."

After his first heart attack, Mr. Sellers appeared to resume his career without missing a beat. Although the material was radically uneven, his performances seemed consistently playful and entertaining: the frustrated Austrian analyst in "What's New Pussycat?" the feverish Italian movie director in "After the Fox," a cheerful James Bond in the profligate "Casino Royale," a baffled Indian visitor to Hollywood in "The Party," a Jewish attorney transformed by his discovery of the counterculture in "I Love You, Alice B. Toklas."

After remaining on an even keel for better than a decade, his career took what appeared to be an irreversible plunge at the close of the '60s. From 1969 to 1974 he languished in a dreadful series of movies, some so derelict that they never made it into release: "The Magic Christian," "Hoffman," "There's a Girl in My Soup," "A Day at the Beach," "Where Does It Hurt?" (surely the symbolic title for the stage of his career), "Alice's Adventures in Wonderland," "The Optimists," "Ghost in the Noonday Sun," "The Blackhouse," "Undercovers Hero."

The movie that halted this pathetic decline was "The Return of the Pink Panther," a triumph revival of the Clouseau character for both Mr. Sellers and writer-director Edwards, whose own career had been fading simultaneously.

The collaborators seemed to rediscover their engaging, expert old form with the star's first entrance: Patrolman Clousseau promptly poked himself in the eye with his own billyclub while saluting an attractive woman and then scolded a blind beggar for soliciting without a license while a bank was being robbed in plain sight. If anything, Clousseau had been ripened into a greater comic archetype that before almost every move he made produced instant embarassment, injury or chaos.

Clousseau wasn't Mr. Sellers' most impressive movie role (that distinction should probably go to Quilty in "Lolita" or the union steward in "I'm All Right, Jack" or the frustrated family man in "Only Two Can Play"), but it should endure as his most popular and indentifiable characterization.

An inept, stupid man with an enormous sense of dignity and self-esteem, Clousseau emerged as a buffoon cursed with almost magical destructive powers. The endearing aspect of his colossal ineptitude was the acute embarassment it caused him. Mr. Sellers was particularly adept at timing those secondary gaffes that inevitably aggravated Clousseau's original gaffes.

According to friends, Mr. Sellers was working on the screenplay of the projected last installment of the misadventures of Inspector Closseau when he checked into London's Dorchester Hotel. David Lewin, a friend and show business reporter for the London Daily Mail, described Mr. Sellers as "a workaholic. . . . He can't slow down. It isn't that he needs the money. He's just happiest when he's working . . . . He sets himself a fearsome pace. It's as though he's driven to accomplish as much as he can."