Christine Nöstlinger, an Austrian children’s writer whose more than 150 books — including works about an oppressive “cucumber king” who lords over a cellar and a “factory-made boy” who always goes to bed on time — earned her some of the highest honors in children’s literature, died June 28 in Vienna. She was 81.

Her publisher, Residenz Verlag, announced the death but did not give a cause. She had recently told News, an Austrian magazine, that she was struggling with chronic obstructive pulmonary disease but was “not allowed to complain about it after smoking for 60 years.”

If less known in the United States, Ms. Nöstlinger was a major literary force in Europe, where she acquired a reputation as a champion for disadvantaged children and racial equality. Her books, which included collections of poetry and journalism for adults, sold millions of copies and were translated into 30 languages.

In a statement, Austrian President Alexander Van der Bellen wrote that the country had “lost one of its most important international literary voices” as well as “a loud and clear voice against all forms of injustice and oppression.”

A onetime art-school student, Ms. Nöstlinger thought she was about to launch her career as an illustrator when she drew a plump, red-haired girl with an impish personality. Writing a children’s story to accompany her sketches, she published “Fiery Frederica” in 1970 — a German-language book that was more acclaimed for its prose than its pictures.

“As I was very keen on approval at the time, I took to writing,” Ms. Nöstlinger later quipped.

The story of Frederica, like nearly all of Ms. Nöstlinger’s tales for children, was fantastical but not escapist, with serious themes but a dash of silliness that drew comparisons to British writer E. Nesbit. At its center is a girl who is bullied because of her brightly colored hair, which has magical powers that enable her to flee her tormentors.

Notable deaths in 2018 and 2019: Nipsey Hussle, George H.W. Bush, Stan Lee, John McCain, Aretha Franklin and other famous faces we’ve lost

Nipsey Hussle, a Grammy nominated rapper who sought to revive South Los Angeles, died at age 33 on March 31. Read the obituary (Matt Winkelmeyer/Getty Images for Warner Music)

While the book’s protagonist escaped into a new and better world, Ms. Nöstlinger said she sought to encourage children to create such a world here on Earth.

“Since children live in an environment which offers them no encouragement to develop utopias for themselves, we have to take them by the arm and show them how beautiful, cheerful, just and humane this world could be,” she said in 1984, accepting the Hans Christian Andersen Award for children’s literature.

“Rightly done,” she continued, “this will make children long for that better world, and their longing will make them willing to think about what must be initiated in order to produce the world they long for.”

Among Ms. Nöstlinger’s best-known books was the young-adult novel “Fly Away Home” (1973), which was based on her childhood in Vienna during World War II, when the city was occupied by Nazi forces and then the Soviet Red Army. (The book was adapted into an Austrian film of the same name in 2016.)

She also wrote books including “The Cucumber King” (1972), about an autocratic vegetable, and “Conrad: The Factory-Made Boy” (1975), about a divorcée — Mrs. Bertie Bartolotti — who receives a mechanical child in the mail. He’s been delivered by mistake and, to avoid being returned, must learn how to be like the other algebra-hating, junk-food-eating “real” boys at school.

In 2003, Ms. Nöstlinger shared the inaugural Astrid Lindgren Memorial Award with writer and illustrator Maurice Sendak. The 5 million-kroner prize, then worth about $580,000, is the world’s largest prize for children’s and young-adult literature.

In its citation, the Lindgren jury praised Ms. Nöstlinger’s “disrespectful humor, clearsighted solemnity and inconspicuous warmth.” She was, they added, “a reliably bad child-rearing influence of the same caliber as Astrid Lindgren,” the Swedish creator of Pippi Longstocking.

Christine Nöstlinger was born in Vienna on Oct. 13, 1936, to a family of politically active socialists. Her father was a watchmaker and her mother ran a nursery school, and the family was made homeless after Allied forces bombed Vienna during World War II.

Ms. Nöstlinger, who was reportedly twice married, dropped out of art school in the late 1950s to raise her two daughters, Christiane Nöstlinger and Barbara Waldschütz. They later contributed illustrations to her books.

A complete list of survivors was not immediately available.

Ms. Nöstlinger received one of Austria’s highest national honors, the Grand Decoration of Honour for Services to the Republic, and in recent years published books including “Being a Woman Isn’t a Sport” (2011), a collection of her newspaper columns, and “Happiness Is a Moment” (2013), a memoir.

She had stopped writing for children altogether, she told the magazine News shortly before her death, in part because she found herself out of touch with today’s young readers.

“How am I supposed to know what makes kids move when they sit on their smartphone for half a day and do something with two thumbs on it?” she said. “Besides, if I hear what today’s kids like to read, it’s mostly fantasy, and it’s so far from me. . . . I understand that they have a longing to flee this complicated world and to go to another, where other rules, different laws prevail and ultimately good always triumphs. But that’s not what I could write.”