Self-taught chemist Owsley “Bear” Stanley, a legend of the 1960s psychedelic underground who produced the LSD that fueled Ken Kesey’s “acid tests” and the Grateful Dead’s acid rock, died March 13 after a car accident in Queensland, Australia, where he had lived since the 1980s. He was 76.

Mr. Stanley, the grandson of a Kentucky governor, grew up in the Washington area before he found his calling in Berkeley,­Calif., as an early patron of the Dead and one of the first people to produce mass quantities of acid.

“I just wanted to know the dose and purity of what I took into my own body,” he told Rolling Stone magazine in 2007. “Almost before I realized what was happening, the whole affair had gotten completely out of hand. I was riding a magic stallion. A Pegasus. I was not responsible for his wings, but they did carry me to all kinds of places.”

Working at first from a makeshift bathroom laboratory in Berkeley, Mr. Stanley produced at least 1 million doses of LSD between 1965 and 1967.

A stubborn, fast-talking perfectionist, he discarded any batch suspected of impurities and soon gained a reputation for producing reliably pure and powerful LSD. His customers were rock stars, Haight-Ashbury hippies and an ever-widening circle of people who wanted to be part of the hallucinogenic era. It made him a fortune.

“Without him, there simply wouldn’t have been enough acid for the psychedelic scene of the Bay Area in the Sixties to have ignited,” the Grateful Dead’s biographer, Dennis McNally, wrote in 2002.

“Owsley” became a brand name for Mr. Stanley’s drugs and then, according to the Oxford English Dictionary, a synonym for any high-quality acid.

He provided the drug to Kesey’s Merry Pranksters for the experiments recounted in Tom Wolfe’s 1968 book, “The Electric Kool-Aid Acid Test,” and to the Beatles and Steely Dan, who sang about Mr. Stanley in “Kid Charlemagne.”

Guitarist Jimi Hendrix sampled Mr. Stanley’s product, as did the Rolling Stones’ Brian Jones and Pete Townshend of The Who.

“The thing about Owsley is that when he gave you something, he would take it too. Just to show you,” Townshend told Rolling Stone. “He must have had the most extraordinary liver.”

When he wasn’t making the multicolored acid tabs known on the street as “White Lightning,” “Blue Dots” and “Monterey Purple,” Mr. Stanley was working with and for the Grateful Dead. An early and enthusiastic fan, he provided band members with all the acid they could drop, paid their rent before they were famous and served as their sound engineer.

As finicky about audio as he was about acid, he worked for years to develop the Dead’s “wall of sound,” a 40-foot-tall bank of more than 600 speakers whose output could be controlled by the musicians on stage.

He plugged in a tape recorder at nearly every one of the Dead’s early sound checks, rehearsals and performances, creating a historical record of the live shows that helped turn the band into a cultural phenomenon. He also helped design the Dead’s widely reproduced skull-and-lightning logo.

Augustus Owsley Stanley III was born Jan. 19, 1935. His grandfather and namesake was Kentucky’s governor from 1915 to 1919 and also served in both houses of Congress.

The younger Stanley, nicknamed “Bear” for his prematurely hairy chest, had a difficult relationship with his father, a lawyer for the federal government who struggled with alcohol addiction through most of his life, and with his mother, who died when he was a teenager.

Mr. Stanley was kicked out of Charlotte Hall Military Academy in St. Mary’s County after sneaking booze onto campus. He committed himself voluntarily to St. Elizabeths Hospital in Washington — “I was just a neurotic kid,” he told Rolling Stone — and then briefly attended and dropped out of both Washington-Lee High School in Arlington and the University of Virginia.

He tried the Air Force and taught himself about electronics and ham-radio operation. On the side, he took courses in Russian, French and ballet. In 1963, he moved to Berkeley to resume his college education. He lasted two semesters.

Mr. Stanley took his first dose of LSD in 1964. He walked outside, “and the cars were kissing the parking meters,” he told Rolling Stone.

Determined to make his own acid, he holed up in Berkeley’s library for three weeks and emerged with all he needed to know.

LSD became illegal in 1966, and police busted Mr. Stanley’s operation the following year. The San Francisco Chronicle’s headline about the arrest of the “LSD Millionaire” inspired the Dead, whose music he first heard at one of Kesey’s acid test happenings, to write the song “Alice D. Millionaire.”

Mr. Stanley always had been a controlling personality — when he rented a house for the Grateful Dead in 1965, he refused to allow “poisonous” vegetables inside, and everyone subsisted on meat for months. That stubbornness helped contribute to his break with the band in the mid-1970s.

Convinced that the Northern Hemisphere would be destroyed by the advancing glaciers of a new Ice Age, Mr. Stanley moved to Australia in the 1980s. He worked as a jewelry-maker, and his belt buckles and other pieces sold for as much as $20,000.

Survivors include his wife, Sheilah; four children, Pete, Starfinder, Nina and Redbird; eight grandchildren; and two great-grandchildren.

In 1970, Mr. Stanley was arrested a second time on drug charges. He served two years in federal prison.

“I wound up doing time for something I should have been rewarded for,” he told the Chronicle in 2007. “What I did was a community service, the way I look at it.”