BEVERLY HILLS, Calif. (AP) _ Sheldon Leonard, who went from playing Hollywood tough guys to producing such TV hits as ``The Andy Griffith Show'' and ``I Spy,'' died Friday at his home. He was 89.

Leonard played underworld figures in the 1940s and 1950s, speaking out of the side of his mouth in such films as ``Guys and Dolls'' and ``Pocketful of Miracles.''

One of his best-remembered roles came in 1946 when he played the bartender who threw Jimmy Stewart out on his ear in the classic ``It's a Wonderful Life.''

In the 1950s, Leonard moved into television, first as an actor, then a director and eventually as a producer of such popular shows as ``The Dick Van Dyke Show,'' which ran from 1961-1966.

Leonard once said ``chronic dissatisfaction'' led to his wide-ranging career.

``Somebody said, `If you don't like the way we're doing it, why don't you do it yourself?' and the next thing I knew I was a director,'' he recalled. ``From there I became a producer, from being chronically dissatisfied with directors.''

With Danny Thomas, he produced, wrote and frequently directed episodes of several highly successfully comedies, such as ``The Andy Griffith Show,'' ``Gomer Pyle'' and ``The Danny Thomas Show.''

He had a recurring role as Thomas' agent in ``The Danny Thomas Show,'' which ran from 1953-1971, winning Emmy Awards in 1957 and 1961 for directing. He also won an Emmy in 1970 for producing ``My World and Welcome to It,'' a situation comedy loosely based on the works of James Thurber.

In 1965, he produced the comedy-adventure ``I Spy,'' which starred Bill Cosby, one of television's first black leading men.

``I could feel the support, and that was very important,'' Cosby recalled in 1988. ``People who've worked for Sheldon will tell you that his good qualities rubbed off on them.''

His last regular role on TV was in 1975 as the star of ``Big Eddie,'' a short-lived sitcom on CBS.

Born Sheldon Leonard Bershad on Feb. 22, 1907, in New York City, Leonard moved to Hollywood after a stage career. With his dapper good looks _ 6 feet tall, dark eyes and hair _ he found ready work as a kind of sly, Damon Runyon gangster.

Leonard was active in humanitarian causes and served on the national board of the Director's Guild for 39 years, and as secretary-treasurer since 1973. He was inducted into the television academy's Hall of Fame in recognition of his achievements.

Leonard is survived by his wife, Francis, son Stephen Bershad, daughter Andrea Bershad and four grandchildren.

Funeral services were scheduled for Monday in Los Angeles.