Robert M. Morgenthau, a courtly Knickerbocker patrician who waged war on crime for more than four decades as the chief federal prosecutor for Southern New York State and as Manhattan’s longest-serving district attorney, died on Sunday in Manhattan. He was 99. Mr. Morgenthau’s wife, Lucinda Franks, said he died at Lenox Hill Hospital after a short illness. His grandfather had been an ambassador in President Woodrow Wilson’s day, and his father was President Franklin D. Roosevelt’s treasury secretary. His own early political forays, two runs for governor of New York, ended disastrously. His former protégés included Associate Justice Sonia Sotomayor of the United States Supreme Court; Gov. Andrew M. Cuomo; former Gov. Eliot Spitzer; Lanny A. Breuer, head of the Justice Department’s criminal division; and Cyrus R. Vance Jr., who succeeded him as the district attorney. Robert Morris Morgenthau was born in Manhattan on July 31, 1919. His grandfather, the real estate tycoon Henry Morgenthau Sr., was President Wilson’s ambassador to the Ottoman Empire in World War I and a prominent voice against Armenian genocide. Robert’s father, Henry Jr., was Roosevelt’s treasury secretary from 1934 to 1945, and his mother, Elinor (Fatman) Morgenthau, was a niece of Herbert H. Lehman, the New York Democratic governor and United States senator. Robert grew up with his brother, Henry III, and his sister, Joan, in New York City, on the family’s farm in upstate East Fishkill, N.Y. He attended the Lincoln School in Manhattan and graduated from the Deerfield Academy in Massachusetts in 1937 and from Amherst College in 1941 with high honors and a political science degree. While studying at Amherst, Mr. Morgenthau met Martha Pattridge, a Smith College student. They were married in 1943 and had five children. His first wife died in 1972. In 1977 he married Ms. Franks, a Pulitzer Prize-winning journalist. They had two children. Besides his wife, he is survived by the children of his first marriage, Jenny Morgenthau, Anne Morgenthau Grand, Elinor Morgenthau, Robert P. Morgenthau and Barbara Morgenthau Lee; the children of his second marriage, Joshua Franks Morgenthau and Amy Elinor Morgenthau; and by six grandchildren and three great-grandchildren.