HAMBURG, Germany — The New York Times was awarded a major German prize on Sunday for its efforts to remain “a beacon of reason and enlightenment in an era of ‘alternative facts’ and allegations of ‘fake news,’” the jury said.

The newspaper’s publisher, Arthur O. Sulzberger Jr., and the paper’s top editor, Dean Baquet, accepted this year’s Marion Dönhoff Prize, named after the well-known publisher of the Die Zeit newspaper, awarded for “international understanding and reconciliation.”

The German president, Frank-Walter Steinmeier, praised the newspaper as “a flagship of freedom of the press” and “a beacon of reason in an age of rampant unreason” in a speech about the newspaper to a crowded theater in Hamburg, where Die Zeit is headquartered.

Mr. Steinmeier, who has been engaged in pressing German political parties to negotiate a new coalition agreement to avoid new elections, told the story of Walter Jacob, who at age 8 watched Nazi rioters destroy his father’s synagogue in his hometown, Augsburg, during Kristallnacht, the night of broken glass, on Nov. 10, 1938.