Herman Wouk, the versatile, Pulitzer Prize winning author of such million-selling novels as “The Caine Mutiny” and “The Winds of War” whose steady Jewish faith inspired his stories of religious values and secular success, died on Friday at 103. Wouk was just 10 days shy of his 104th birthday and was working on a book until the end, said his literary agent Amy Rennert.Rennert said Wouk died in his sleep at his home in Palm Springs, California, where he settled after spending many years in Washington, D.C. Among the last of the major writers to emerge after World War II and first to bring Jewish stories to a general audience, he had a long, unpredictable career that included gag writing for radio star Fred Allen, historical fiction and a musical co-written with Jimmy Buffett. He won the Pulitzer in 1952 for “The Caine Mutiny,” the classic Navy drama that made the unstable Captain Queeg, with the metal balls he rolls in his hand and his talk of stolen strawberries, a symbol of authority gone mad. A film adaptation, starring Humphrey Bogart, came out in 1954 and Wouk turned the courtroom scene into the play “The Caine Mutiny Court-Martial.” The son of Russian Jews, Wouk was born in New York in 1915. The household was religious — his mother was a rabbi’s daughter — and devoted to books. His father would read to him from Sholem Aleichem, the great Yiddish writer. A traveling salesman sold his family the entire works of Mark Twain, who became Wouk’s favorite writer, no matter how irreverent on matters of faith. Wouk majored in comparative literature and philosophy at Columbia University and edited the college’s humor magazine. After graduation, he followed the path of so many bright, clever New Yorkers in the 1930s: He headed for California, where he worked for five years on Fred Allen’s radio show. If war had not intruded, he might have stuck to comedy sketches. After the bombing of Pearl Harbor he enlisted in the Navy and served as an officer in the Pacific. There, he received the writer’s most precious gift, free time, and wrote what became his first published novel, the radio satire “Aurora Dawn.” By the time “Aurora Dawn” came out, in 1947, Wouk was married and living in New York. His novel was a Book-of-the-Month Club selection and he would soon publish “City Boy,” a coming-of-age story highly influenced by Twain. In 1951, Wouk released his most celebrated novel, “The Caine Mutiny.” It sold slowly at first but eventually topped best-seller lists and won a Pulitzer. For a time, Wouk was compared to other World War II novelists: Norman Mailer, Irwin Shaw, James Jones. But his next book looked into domestic matters. Wouk spoke often of his concern about assimilation and this story told of an aspiring Jewish actress whose real name was Marjorie Morgenstern. Her stage name provided the novel’s title, “Marjorie Morningstar.” But like “The Caine Mutiny,” the novel sold millions and was made into a movie, starring Natalie Wood. (Wouk eventually bought Wood’s former home in Palm Springs). He was famous enough to appear on the cover of Time magazine, even as some Jews complained his book perpetuated stereotypes and critics complained he was too old-fashioned, too accepting of authority. Captain Queeg, for example, may be a villain in popular culture, but “The Caine Mutiny” was not “Catch-22.” Wouk was just as hard on the officers who rebelled against Queeg. The “crux” of the story, Wouk wrote in his journal, was that the “mutiny was a mistake” and the crew should have stood by its leader, however flawed. In 1945, Wouk married Betty Sarah Brown, who also served as his agent. They had three sons— Nathaniel, Joseph and their eldest, Abraham, who drowned in 1951, a death that left Wouk with “the tears of the scar of a senseless waste.”