Ted Sorensen, one of former US president John F Kennedy's key advisers and top speech writers, died last night aged 82.
Mr Sorensen died at a New York hospital from complications of a stroke, his widow Gillian said. He suffered a stroke in 2001 and had another just over a week ago.
A retired lawyer and recipient of the National Medal for Humanities in 2009, Mr Sorensen was most closely associated with Kennedy, and known for liberal leanings seen as having doomed efforts to make him head of the CIA under Jimmy Carter.
A conservative backlash against his comments about the CIA and his liberal association with the Kennedy White House quickly doomed efforts to put Mr Sorensen in charge of the US spy agency before they even got off the ground in 1977.
But just 15 years before, Mr Sorensen had been at the seat of power, advising Kennedy on such matters as the Cuban missile crisis and writing the words spoken by one of the country's most articulate presidents.
He was credited with composing some of Kennedy's most famous phrases, despite protesting that he did not. One columnist claimed Mr Sorensen had written, not just researched and edited, Kennedy's Pulitzer Prize-winning book Profiles in Courage.
Later, one of Kennedy's most oft-quoted lines from his inaugural address - "Ask not what your country can do for you; ask what you can do for your country" - was also attributed to Mr Sorensen, who worked on the speech but insisted Kennedy wrote those words.
As one of Kennedy's closest advisers - Kennedy called him his "intellectual blood bank" - he worked on both domestic policy and after the Bay of Pigs fiasco, foreign affairs as well, drafting Kennedy's correspondence with Soviet leader Nikita Khrushchev during the Cuban missile crisis.
After Kennedy's assassination, Mr Sorensen stayed on briefly at the White House but left to write the biography Kennedy, published in 1965.
When Mr Carter chose him to lead the CIA, his earlier words favouring curtailing some CIA activities came back to haunt him.
And in papers filed for the Pentagon Papers trial of Daniel Ellsberg, Mr Sorensen admitted taking classified papers from the White House when he left in 1964 to help him write his biography.
Conservative interest groups and Republican senators lined up in opposition and Mr Sorensen withdrew his nomination during confirmation hearings.
The Lincoln, Nebraska native earned a law degree from the University of Nebraska before joining Kennedy's Senate staff after his election in 1952. He dipped into the political arena himself in 1970, running for Senate from New York, but lost the Democratic primary.
In later years he worked with Nelson Mandela on voter education in South Africa and was active in Barack Obama's US presidential campaign.
Mr Obama issued a statement saying he was saddened to learn of Mr Sorensen's death. "I know his legacy will live on in the words he wrote, the causes he advanced, and the hearts of anyone who is inspired by the promise of a new frontier," he said.
Mr Sorensen's most recent book, Counselor: A Life at the Edge of History, was published in 2008.
Reuters