Harper Lee, author of the novel “To Kill a Mockingbird,” one of the greatest literary successes of the last century and the basis for the classic 1962 film of the same name, has died, the city clerk’s office in her hometown of Monroeville, Ala., confirmed. She was 89.

“To Kill a Mockingbird” (1960), the story of Atticus Finch, a lawyer in an Alabama town in the 1930s who defends a black man accused of raping a white woman, and his daughter Scout Finch, won the Pulitzer Prize and has sold 30 million copies and been translated into 40 languages. It has never been out of print since its initial publication.

Claudia Durst Johnson’s critical study “To Kill a Mockingbird: Threatening Boundaries” quotes a study that found that “To Kill a Mockingbird” “has been consistently one of the ten most frequently required books in secondary schools since its publication in 1960” — this despite the numerous efforts, especially in the South, to have it banned. Johnson found a survey that ranked the book “second only to the Bible in being most often cited as making a difference in people’s lives.”

Gregory Peck starred as Atticus Finch in the 1962 film adaptation directed by Robert Mulligan.

Robert Duvall, in his bigscreen debut, played Boo Radley, and Brock Peters portrayed Tom Robinson, the black man unjustly accused but in the end still found guilty. The film was nominated for eight Oscars, winning for best actor (Peck), adapted screenplay (Horton Foote) and art direction. The film was also nominated for best picture; supporting actress for young Mary Badham, who played Scout; director; cinematography, black and white; and music score.

Lee was happy with Foote’s adaptation of her novel: “I think it is one of the best translations of a book to film ever made,” she declared. “In that film the man and the part met… I’ve had many, many offers to turn it into musicals, into TV or stage plays, but I’ve always refused. That film was a work of art.”

The author became a friend of Gregory Peck’s, and was long close to the actor’s family; the actor’s grandson, Harper Peck Voll, is named after her.

In 1995 the film was voted into the National Film Registry by the National Film Preservation Board.

Aaron Sorkin is writing a new stage adaptation of “To Kill a Mockingbird” for a Broadway run during the 2017-18 season.

During her period in New York, Lee initially worked as an airlines reservation clerk, before a monetary gift enabled her to get to work in earnest on “To Kill a Mockingbird.” In 1963 Lee appeared on “The Merv Griffin Show,” but she eventually returned to her home town of Monroeville, Alabama, for a long quiet life in which she did not give interviews.

Lee returned to the public eye in July 2015 with the publication of a second book, “Go Set a Watchman,” which had actually been written before “To Kill a Mockingbird.” “Go Set a Watchman” is the story of an adult Scout Finch, who lives in New York in the 1950s, like Lee, and goes South to visit her father, Atticus Finch, a lawyer who, as the civil rights movement is developing, has become a segregationist. Back in the ’50s, publishers were more interested in the flashbacks contained within “Go Set a Watchman” than in the novel itself, and those flashbacks formed the germ of “To Kill a Mockingbird.”

The publication of “Go Set a Watchman” (the title is an allusion to a Bible verse) caused a great deal of controversy in 2015; many critics and readers were dismayed to find that their beloved Atticus Finch, as much a symbol of the civil rights movement as many living, heroic figures of the period, had been transformed into a segregationist. But, of course, it only felt like a transformation — like a betrayal on the part of Lee — since this novel, a far less mature work than “To Kill a Mockingbird,” had been written first.

Despite the controversy, or perhaps because of it, “Go Set a Watchman” sold more than 1 million copies in its first week.

Lee was depicted in two recent high-profile films. She was friends from childhood with Truman Capote, author of “In Cold Blood” and “Breakfast at Tiffany’s,” and, after writing  “To Kill a Mockingbird,” she traveled to Kansas with him to assist him with the investigation that led to “In Cold Blood” — which in turn led to the movies  “Capote” (2005) and “Infamous” (2006), both about how Capote came to write “In Cold Blood.” In the first, Capote was played by Philip Seymour Hoffman and Lee was portrayed by Catherine Keener; in the second, Toby Jones played Capote and Sandra Bullock played Lee. (Capote died in 1984.)

Nelle Harper Lee was born in Monroeville, Alabama, the daughter of a lawyer.

Over the years she worked on various other books but was never satisfied with the results. She also traveled occasionally to receive awards, including honorary doctorates.

In 1966 President Lyndon B. Johnson appointed Lee to the National Council on the Arts, while in 2010 President Barack Obama awarded Lee the National Medal of Arts, the highest honor given by the U.S. government for “outstanding contributions to the excellence, growth, support and availability of the arts.” Three years earlier, President George W. Bush presented her with the Presidential Medal of Freedom. In his remarks on that occasion, Bush declared, “One reason ‘To Kill a Mockingbird’ succeeded is the wise and kind heart of the author, which comes through on every page … ‘To Kill a Mockingbird’ has influenced the character of our country for the better. It’s been a gift to the entire world. As a model of good writing and humane sensibility, this book will be read and studied forever.”