During her brief career as a silent-film star, “Baby Peggy” came perilously close to death time and again. The child actor — a toddler when she debuted in 1921 — was thrown from a speeding pickup truck, narrowly escaped a horse trampling and survived near-drownings and incineration, all in the pursuit of making movies in an era with minimal supervision of child welfare.

Born Peggy-Jean Montgomery, she became one of the country’s youngest self-made millionaires by age 4, then suffered a devastating reversal of fortune and fame in her adolescence. In adulthood, she rebounded with a new name, Diana Serra Cary, and became a respected author of books on Hollywood film history. In her autumnal years, at screenings of her few extant films, she found herself embraced as a movie pioneer.

Mrs. Cary, 101, who was among the last living Hollywood stars of the silent era, died Feb. 24 at her home in Gustine, Calif. Rena Kiehn, a board member of the Niles Essanay Silent Film Museum in Fremont, Calif., confirmed her death but did not cite a cause.

Mrs. Cary was born into the movies, on Oct. 29, 1918, in San Diego. The family soon settled in Los Angeles. Her father, a former cowboy and park ranger, worked as a stunt double for western star Tom Mix while her mother was a movie extra. Baby Peggy was 19 months old when her mother brought her to Century Studio, where a director paired her with the animal star Brownie the Wonder Dog.

She made dozens of shorts over the next several years, many of which have been lost. Those that survive show a precocious toddler with a gift for physical comedy and mimicry. A still from the short “Peg o’ the Movies” (1923) shows her in a slinky dress and holding a cigarette in an imitation of exotic actress Pola Negri. In other comedies, she parodied film stars Rudolph Valentino and Mary Pickford.

“She was able to do imitations, which is something a really small child isn’t usually capable of,” film historian Kevin Brownlow told the London Independent in 2006. “In one of her films, she plays an old grandfather with a beard.”

“You can see that often the camera is grinding and that she is doing things very naturally which [the filmmakers] are picking up,” Brownlow added, “but she is also perfectly capable of taking direction which — given her age — is quite amazing.”

Doing her own stunt work, she was held underwater in “Sea Shore Shapes” (1921) and positioned under the rods of a train in “Miles of Smiles” (1923). Her father, who attributed her talent and success to “plain old-fashioned obedience,” supervised the shoots.

By 1923, she was signed by a bigger studio, Universal, where she commanded $10,000 a week for feature-length films. The next year, she starred opposite Clara Bow in the comedy “Helen’s Babies.”

“To be taken seriously,” studio chief Carl Laemmle once said, “a child star should make you cry.” To that end, he cast Baby Peggy in “The Darling of New York” (1923), a tear-jerker — with treacherous stunt work — about an immigrant family that survives a tenement fire.

For the film’s climax, the set was doused with kerosene and set ablaze, including (by accident) a door that was to serve as Baby Peggy’s escape route. She improvised by breaking the window and clawing her way out across a burning windowsill. The scene is all that remains of the film today.

Baby Peggy lent her name and image to sweaters, jewelry, handbags and dolls. In 1923, her father secured her a $1.5 million-a-year contract with independent producer Sol Lesser. For Lesser, she had her last starring role in “Captain January” (1924), the story of an elderly lighthouse keeper who adopts an orphaned girl and nearly loses her when she is reunited with her aunt. (The film was later remade as a vehicle for the Depression-era moppet star Shirley Temple.)

When her father bickered with Lesser over her salary, the movie mogul reportedly blackballed the family. For the next four years, Baby Peggy and her parents worked in vaudeville, then in its waning days before the rise of sound films. Her act included slapstick routines and a teary-eyed ode to a dead dog (a stuffed toy with its filling removed). She closed her show with an imitation of Scottish music hall singer Harry Lauder.

When the grueling travel proved too much for the family, her father made a down payment on a Wyoming dude ranch. But his mismanagement, coupled with the 1929 stock market crash, plunged the family into poverty. Baby Peggy soon learned that she had been the family breadwinner and that members of the family had squandered her earnings.

“They had a house in Beverly Hills before I was 3,” she told the Los Angeles Times in 2011. “Then we had a house in Laurel Canyon. Then we had a Duesenberg car that was $30,000. I was making a lot of money. My films were circulated over the globe and I had piles of fan mail.

“But they thought Hollywood was forever,” she continued. “My parents had no plan for adulthood for my sister and myself. We weren’t sent to school. . . . We simply grew up and worked. We had no education at all. I did have the good luck to have one tutor.”

In 1932, the family pooled its savings to return to Hollywood. Two years later, she enrolled in an acting school where her classmates included Judy Garland. Fleeing her parents’ quarrelsome marriage, she left home at 17 with her older sister, Louise, and three years later eloped with a bartender and aspiring actor, Gordon ­Ayres.

She re-christened herself Diana and took her husband’s surname in an attempt to create a new Hollywood persona. She could find work only as an extra.

“Men, more often than not, would cruise the set,” she once told the cinema and media publication Framework, “and if there was an attractive girl — once in a while they would try me — who wasn’t doing anything, they would massage your neck. I would get more tense, and they would say ‘just relax.’ They’d hang out and they’d make all kinds of innuendos, which I didn’t fully understand but I got the gist. I could see that this was hunter and prey.”

She added, “Then I discovered something by accident: If I took a serious, scholarly book to work, it was just like mustard gas. Men just didn’t come near me.”

In fact, books and writing gave her a new lease on life. In 1954, she started a greeting card company and later, in the 1960s, ran a bookstore at the University of California at San Diego while freelancing as a writer on historical and theological subjects.

In 1975, she wrote a book about her father’s world of silent-film stunt riders, “The Hollywood Posse.” She followed that volume three years later with “Hollywood’s Children: An Inside Account of the Child Star Era.” Of the second, author Anne Edwards wrote in a Washington Post review, “Cary writes with intelligence and manages a master-weaver’s task in picking up the threads of the many stories she is telling simultaneously.”

In 1996, Mrs. Cary wrote a memoir, “What Ever Happened to Baby Peggy?” She was also featured in a 2012 documentary, “Baby Peggy: The Elephant in the Room.”

Her marriage to Ayres ended in divorce. After converting to Catholicism, she took the middle name Serra, in honor of the canonized Spanish missionary Junípero Serra. Her second husband, Robert Cary, whom she married in 1954, died in 2003. Survivors include a son from her second marriage, Mark Cary of Gustine; and a granddaughter.

In her final decades, Mrs. Cary belonged to A Minor Consideration, a nonprofit advocacy group for child performers. Speaking at film screenings, she met aspiring stage parents who often missed the point of her talks.

“I tell them I have yet to find a 2-year-old who can find a studio door without help from a parent,” she told the New York Daily News. “I think that’s too young.”