The recent publication of Harper Lee’s “Go Set a Watchman” has left many fans of her 1960 novel “To Kill a Mockingbird” disillusioned. Some who regarded “Mockingbird”’s central character Atticus Finch as a moral paragon fighting Southern racism have been deeply disappointed by “Watchman” (actually an earlier draft of “Mockingbird”), in which Atticus is rendered as a racist curmudgeon.

Readers unhappy about losing a fictional Atticus might, however, reclaim the “real” one. Gregory Peck, who so famously embodied Atticus in the film version of “Mockingbird,” passionately opposed racial prejudice. And now, unpublished documents in the Margaret Herrick Library (the Oscars archive) reveal Peck’s personal opposition to racism, long before Harper Lee even wrote “Mockingbird.” The young actor attacked bigotry against both blacks and Jews.

Peck expressed some of his earliest anti-racist views with regard to Haiti. The U.S. had occupied Haiti from 1915 to 1934, and Hollywood films from the era depicted the country as a land of bizarre “voodoo” rites and zombies. However, Peck had visited the country in the 1940s, and when Darryl Zanuck of Fox Studios sought to persuade him to star in “Lydia Bailey,” an adventure-romance set during the Haitian Revolution (1791–1804), Peck asked to make a more serious film about Haiti.

He wanted to highlight the egalitarian ideals of Haiti’s revolution, in which African slaves had successfully revolted and made their country the first free black republic in the Americas. Peck likened Haitians’ fight for independence to the American Revolution. He spoke of how Haitian revolutionaries “carried on democratic ideals… against all the efforts of the French to retake the island and continue the exploitation of the people, their former slaves.” Peck compared the suffering of Haitians and “the poor negroes in the [American] South,” who he felt were even worse off.

Peck also denounced anti-Semitism, most notably through his role in the 1948 film “Gentleman’s Agreement.” It is easy today to forget the strength of anti-Semitism in the U.S. before the 1960s, where Jews faced widespread discrimination in housing and the workplace, as well as at prestigious universities and resorts. Anti-Semites such as Congressman John Rankin of Mississippi even used the word “kike” on the House floor. Though many Jewish studio executives were afraid to acknowledge the problem, for fear of a backlash, Daryl Zanuck, one of Hollywood’s few non-Jewish studio heads, decided to tackle the subject. He sought to turn Laura Hobson’s 1946 novel “Gentleman’s Agreement” into a film, personally entrusting the story to Peck. Peck’s stirring portrayal of Phil Green, a gentile journalist who goes undercover to expose everyday anti-Semitism, has become legendary. The role earned Peck an Oscar nomination.

Peck’s spirited defense of egalitarianism in the film was not merely an act. He took the role against the advice of his agent, who told him that challenging anti-Semitism could make him deeply unpopular. When asked by Coronet Magazine what the film meant to him, Peck responded, “To me ‘Gentleman’s Agreement’ was a picture about Americanism.” As the House Un-American Activities Committee had begun targeting many of Peck’s liberal colleagues, Peck remarked pointedly that the best defense against communism was to live up to America’s noblest ideals: “We can best fight communism by practicing democracy.”

Though “Mockingbird” fans can safely reclaim Peck, it would oversimplify the history of racism and anti-Semitism in the U.S. to treat him as the uncomplicated paragon Atticus once appeared to be. It is perhaps a fool’s errand to search for unblemished heroes, given how deeply rooted prejudice can be even among those seeking to free themselves from it. Even before “Watchman”’s publication, scholars of race had noted that Atticus, despite defending an accused African American, did little to attack the larger structure of racism in his society.

In Peck’s case, his actions may not have always lived up to his pronouncements. For his proposed film about Haitian history, he wanted to occupy the starring role himself rather than hire an African-American actor — which would have meant his appearing in blackface. More notably, even as he crusaded on screen against “gentleman’s agreements” barring Jews, he may not have challenged them as forcefully in person. At the same time that he was filming “Gentleman’s Agreement,” he was founding the La Jolla Playhouse in his hometown of San Diego. Though Jews numbered among San Diego’s founders in the 19th century, the coastal area of La Jolla remained one of the city’s most fervent strongholds of prejudice. Mary Ellen Stratthaus has chronicled the restrictive covenants there, dating from the 1920s, that excluded anyone whose “blood was not entirely of the Caucasian race” from purchasing property. Real estate agents also used more subtle means to prevent Jews from moving to town, which residents feared would ruin the community and drive down property values. While conducting oral histories, Stratthaus was told that, when the Playhouse held cast parties at the La Jolla Beach and Tennis Club, Jewish actors were not allowed to attend, something that Peck apparently did not protest (though Peck denied this to her in a 1996 letter).

Today, La Jolla is home to a thriving Jewish community — one of the most vibrant on the West Coast. However, it was not Peck who effected this sea change, but rather Roger Revelle, founder of the University of California, San Diego. Revelle insisted to town fathers in the 1950s that restrictive covenants must disappear if he were to build a world-class research institution that could attract Jewish faculty.

Nevertheless, it would be a mistake to underestimate Peck’s influence in creating a new America in the postwar period, one in which anti-Semites found themselves on the wrong side of history. In “Antisemitism in America,” Leonard Dinnerstein has written of the explosive impact that “Gentleman’s Agreement” had in “unmask[ing] those who tried to hide their bigotry under the mask of gentility and conformity.” The film, Fox’s highest grossing of 1948, deeply affected those who saw it. Zanuck told Peck, “I have never received half as many telegrams or phone calls on any previous picture and many people believe it is the best picture they have ever seen.” Peck himself was deluged with letters from Jews who suffered from anti-Semitism in their daily lives, and who were overwhelmed with gratitude at seeing him denounce these practices openly. “Gentleman’s Agreement” went on to win Best Picture at the 1948 Oscars, beating “Crossfire” (an equally well-intentioned film on anti-Semitism that had a lesser impact).

It was Peck’s deep belief in the words he spoke in “Gentleman’s Agreement” that allowed him to deliver them so powerfully — and that inspired both Jews and blacks to imagine a world without prejudice. At a time when parallel films about blacks were not being made, one African-American teenager wrote Peck that “Gentleman’s Agreement” gave her the “courage to fight” to achieve her dreams. She noted that Peck should not feel bad about having lost the Best Actor award to another nominee, since “In Gentleman’s Agreement you weren’t acting. Your sincerity, honesty and belief in what you said rang as clear and true as a church bell.”

Alyssa Goldstein Sepinwall is a professor of history at California State University, San Marcos.