The prize also recognized investigations into the film mogul Harvey Weinstein, whose predations of women — and extensive efforts to cover up his behavior — were exposed in The Times by Jodi Kantor and Megan Twohey, and in The New Yorker by Ronan Farrow.

The coverage of Mr. Weinstein, who has since lost his movie empire, set off a cascade of testimonials from women about abuse in the workplace, whether at a Beverly Hills hotel or a Ford Motor plant in the Midwest. Famed personalities, including the comedian Louis C.K. and the chef Mario Batali, saw their careers derailed after women came forward with allegations of misconduct.

“By revealing secret settlements, persuading victims to speak and bringing powerful men to account, we spurred a worldwide reckoning about sexual abuse that only seems to be growing,” Dean Baquet, executive editor of The Times, told hundreds of journalists who had gathered in the paper’s Manhattan newsroom on Monday for the Pulitzer announcements.

The Post won the award for investigative reporting for its exposé of Roy S. Moore, the Republican Senate candidate in Alabama, whose bid for higher office was upended after The Post uncovered that he had groped and harassed multiple women, one as young as 14. Besides unearthing the allegations against Mr. Moore, The Post’s reporters foiled an attempt by the right-wing activist James O’Keefe to undermine their reporting by planting false information in the paper.

“Journalists need both a soul and a spine,” Martin Baron, the executive editor of The Post, said on Monday. His reporters “showed soul in their thorough dedication to our mission of getting at the truth,” he said. “They showed spine by staying focused on their work in the face of denunciation, deceit and threats by politicians and their allies.”

Mr. Baron called the Pulitzer-winning coverage “a case study in why we need a free and independent press in this country.”

Presidential politics figured in the prizes for explanatory reporting, given to The Arizona Republic and the USA Today Network for scrutinizing the consequences of Mr. Trump’s pledge to build a wall along the Mexican border; for commentary, given to John Archibald of the Alabama Media Group in Birmingham for writings on Mr. Moore’s candidacy; and for criticism, awarded to the art critic for New York magazine, Jerry Saltz.