In 1991, the African American Yale Law School professor Stephen Carter wrote a book called Reflections of an Affirmative Action Baby. I remember reading part of it at the time. Little did I realize that the book’s title applied to me.

Two years after Carter published his book, I joined The New Republic as a summer intern. I was thrilled. I had been reading the magazine since high school, and idolized its most prominent writers: Michael Kinsley, Hendrik Hertzberg, Andrew Sullivan, Michael Lewis, Michael Kelly, and, yes, Leon Wieseltier, who last month was accused of sexual misconduct by more than a dozen of his former colleagues. If someone had made TNR writers into baseball cards, by age 15 I would have had a complete set.

I considered myself qualified. Because I’d spent years mimicking TNR’s writing style, I had the right sort of clips. But as a white man graduating from an Ivy League school, I also had the right sort of identity. It was difficult to disentangle the two. And I didn’t really try.

I didn’t try because the magazine afforded me extraordinary opportunity. Soon, I was not only working alongside people I revered, I was being given the chance to ascend to their level. Asking how much of their success was due to race, gender, and class—as opposed to merit—would have meant asking the same of myself.

At some level, I knew the answer. White men from fancy schools advanced quickly at The New Republic because that’s who the owner and editor in chief, Marty Peretz, liked surrounding himself with. He ignored women almost entirely. There were barely any African Americans on staff, which is hardly surprising given that in 1994—after my internship and before I returned to the magazine as managing editor—TNR published an excerpt of Charles Murray and Richard Herrnstein’s book, The Bell Curve (along with a series of critical responses). Marty felt a particular hostility to affirmative action. The irony—which I didn’t dwell on at the time—was that the magazine was itself a hothouse of racial and sexual preference. Those racial and sexual preferences were never stated formally. But to a significant degree, they determined who felt comfortable at TNR and who won the favor of the people who ran it. To borrow Ta-Nehisi Coates’s metaphor, my race, gender, and class provided me a “tailwind.” I was running hard. But without that tailwind, it’s unlikely I would have become the magazine’s editor at age 28.

Like Carter, I was a beneficiary of affirmative action. Except that his version remedied historic injustices. Mine perpetuated them.

The New Republic’s affirmative action enabled Leon Wieseltier’s sexual harassment, and Leon’s sexual harassment reinforced the magazine’s affirmative action. Men ran the magazine, and Leon’s behavior helped keep it that way. To ascend at TNR, you had to be a protégé of either Marty’s or Leon’s, or, at the very least, you had to be on decent terms with them. For men, that meant writing things they considered smart. For women, by contrast, mentorship was far trickier. Marty wasn’t an option. Leon was, but his mentorship often involved sexualization. If you accepted it, you gained a supporter but compromised yourself. If you spurned it, you became invisible to the magazine’s two most powerful men.

I’d like to say that when I became editor, I fundamentally changed all this. But I did not. Yes, I hired women, including for senior editing jobs. Yes, I made some effort to cultivate writers of color. But, for the most part—like all the white, male, Ivy League editors who preceded and succeeded me—I perpetuated the culture in which I had thrived. That culture was both subtle and pervasive: The absence of women and people of color in senior editorial jobs was intertwined with the magazine’s long-standing, jaundiced view of the African American and feminist left. Had I challenged that culture more emphatically, I would probably not have become editor in the first place.

There are things about my era at TNR that I’m proud of: the magazine’s call for American action to end the ethnic cleansing in Bosnia and Kosovo, Andrew Sullivan’s history-altering arguments for gay marriage. TNR published a great deal of excellent journalism. But in retrospect, I used that good work to justify a series of moral compromises. From my time as a junior editor, I was handed pieces to edit—generally written or commissioned by Marty—that made sweeping, hostile generalizations about Palestinians, Arabs, or Muslims. I would cut as much as I felt I could get away with and soften or nuance the rest. But I didn’t refuse to edit the pieces at all, since that would have imperiled my relationship with my mentors. (In fact, when I began writing more critically about Israeli policy after leaving the magazine, my relationships with both Marty and Leon swiftly declined.)

In some cases, the moral compromises weren’t ideological. When Marty fired Michael Kelly (who later became editor of The Atlantic), in part because Kelly was critical of Marty’s friend and former student, Al Gore, I considered resigning. But I feared I’d never find another job I enjoyed as much. Two years later, I was editor myself.

In ways I didn’t recognize at the time, those concessions created the template for my response to my former colleague Sarah Wildman when, in 2002, she told me about Leon’s inappropriate sexual advances. I believed her and grasped the seriousness of the charge. I also knew that I lacked authority over Leon. He had been literary editor since I was an intern and for decades enjoyed complete autonomy over the “back of the book.” The magazine had no sexual-harassment procedures. So I called Marty—who spent most of his time in Cambridge, Massachusetts, and New York—and asked him to come to Washington to tell Leon that his behavior was unacceptable. (Marty has told Vox that I never reported the incident to him and that he doesn’t “remember Sarah Wildman.” Leon did not respond to my request for comment.

Marty, Leon, and I met at the Willard Hotel. When I confronted him, Leon—who had a gift for intimidation—reacted ferociously. “Is this some kind of intervention?” he roared. Marty didn’t push back. That was it. Leon never admitted to having done anything wrong, and he received no punishment. Sarah, having incurred Leon’s wrath, felt isolated at the magazine and left.

I could have threatened to resign. Given the closeness of their relationship, and the degree to which Marty relied on Leon intellectually, it’s unlikely Marty would have fired Leon to placate me. I was more expendable. On the other hand, firing me over a sexual-harassment charge—even in 2002—would have made TNR look awful. Had I threatened to resign—or simply done so—I might have shifted the power dynamic and forced Marty into taking some action that punished Leon and validated Sarah, which might have begun to erode the impunity that made Leon’s behavior possible.

But I did not. By 2002, I had already made a series of moral compromises in order to stay at TNR, and in ways I didn’t fully realize, each laid the foundation for the next.

I don’t know whether my experience is typical of men who are complicit in institutions that tolerate sexual harassment. What I do know is that the affirmative action I enjoyed, and the sexual harassment Sarah suffered, were connected. I was given extraordinary opportunity at TNR, in large measure, because talented women like Sarah Wildman were not.

In this regard, I suspect, I have something in common with the supporters of Donald Trump. It’s not pleasant to realize that the bygone age you romanticize—the age when America was still great—was great for you, or people like you, because others were denied a fair shot. In the America of the 1950s, or even the 1980s, white, straight, native-born American men didn’t worry as much about competing with Salvadoran immigrants and Chinese factory workers and professional women and Joshua-generation African Americans.

Except for among the ultra-rich, the American pie is not expanding all that much. And so a lot of white American men look at Barack Obama, and Hillary Clinton, and mass immigration, and the global competition for jobs, and the taking down of Confederate monuments, and even the revolt against sexual harassment, and fear all this means there will be less left for them. And they experience these attacks on their privilege as a desecration of the natural order, an attack on institutions that benefited them and to which they felt deep loyalty in return.

What kind of journalistic career would I have had without affirmative action? A less successful one, probably. Ensuring that I am never again complicit in an institution that tolerates sexual harassment means embracing a world in which I lose some of my undeserved advantage. Only by doing that can I offer the women of The New Republic the apology they deserve.