Hans Riegel, a second-generation German confectioner who helped bring the bear-shaped, fruit-flavored gelatins known as gummi bears to candy lovers all over the world, died Oct. 15 in Bonn. He was 90.

Haribo, the company he led for more than six decades, announced the death and said Mr. Riegel had recently undergone brain surgery. Forbes magazine estimated his net worth at nearly $3 billion earlier this year.

Mr. Riegel’s father, also named Hans, started Haribo in 1920. He named the company for the first letters in his first and last names and the city where the company was founded, Bonn. The elder Riegel concocted the first “dancing bear,” which resembled circus bears, in 1922. Under his son’s purview, the dancing bear later morphed into “gold bears,” which continue to be Haribo’s signature product.

Mr. Riegel and his younger brother Paul became fully involved in the business after World War II. Their father had died just before the war’s end in 1945, and Mr. Riegel had returned to Bonn after being held as a prisoner of war. At the time, Haribo had 30 employees and 10 sacks of sugar, the German publication Spiegel reported.

Paul Riegel specialized in finding food supplies and keeping the machinery working, while the more gregarious Mr. Riegel, who vowed to “make something of my father’s life work,” became the public face of the operation.

Hans Riegel, the longtime boss of German candy maker Haribo, in 2009. (Rolf Vennenbernd/ASSOCIATED PRESS)

Overseeing product development and marketing, Mr. Riegel aggressively promoted the company’s slogan — “Kids love it so,” conceived by their father. (By the 1960s, the motto was revised to include adults.)

As Haribo spun off new items such as licorice wheels, the company began to expand internationally by the late 1950s and took over Dutch and French candy concerns. In 1982, Haribo opened a U.S. office in Baltimore that helped to mass-market gummi bears at major supermarkets; earlier, Haribo candies had only been available in specialty stores.

The company stayed attuned to food preferences based on religious tradition. The Haribo factory in Turkey makes halal-friendly gummi bears with beef-based gelatin. The company also makes kosher and vegetarian gummi bears.

Under Mr. Riegel’s watch, Haribo devised dozens of sweets and other products, including Vademecum sugar-free gum and Maoam fruit chewies. He said he read comic books and watched children’s movies for inspiration.

“I love children,” he once said. “They are my customers. I have to be informed about what they want to nibble, what they think, what language they speak.”

Haribo took meticulous care to stay on top of trends and created a fruit-gum candy in the shape of sports figures to commemorate the 1996 Olympics. Not all its new ideas succeeded. A fruit gum version of the Holy Family, meant for Christmastime release, ran afoul of Catholic Church authorities. And fruit-gum images of leading German politicians failed to have much of a commercial impact.

Despite occasional setbacks, Haribo grew to 6,000 employees and became one of the world’s largest makers of gummi candy, licorice and marshmallows. Mr. Riegel was adamant about maintaining complete control of the company and reputedly declined an investment offer from Warren Buffett in 2008. “No investor. No shares. No bonds,” the London Guardian once quoted him saying.

Johannes Peter Riegel was born in Bonn on March 10, 1923, and was a badminton champion in his youth. He received a PhD in economics from the University of Bonn, writing his dissertation on the role of sugar in world trade. He was married at least once and had no children. Paul Riegel died in 2009.

Mr. Riegel maintained an active role in Haribo until he fell ill earlier this year.

His connection with bears went beyond the gummi kind. In 2006, he produced chocolate and caramel chews to honor a brown bear named Bruno, which was killed by German hunters after it wandered into populated areas. Despite the pleas of environmentalists, a German environmental ministry declared Bruno a danger to humans.

“It’s wonderful when bears are allowed to live in the wild,” Mr. Riegel was quoted as saying. “We want to help the next bear that ends up in our woods so it doesn’t suffer the same fate as Bruno.”

A portion of the proceeds went to the World Wide Fund for Nature to protect wild bears.