"We know the true record of Barack Obama," he said. "There is the courage he showed when so many others were silent or simply went along. From the beginning, he opposed the war in Iraq. And let no one deny that truth."
Kennedy was said to have been upset by former President Bill Clinton for, in his view, having injected race into the primary campaign. In his endorsement Kennedy referred to Obama as someone who would be "a president who refuses to be trapped in the patterns of the past... a fighter who cares passionately about the causes he believes in, without demonizing those who hold a different view...With Barack Obama, we will turn the page on the old politics of misrepresentation and distortion."
Kennedy gave a passionate speech at last year's Democratic National Convention in Denver and pledged to be at work when the Obama Administration began on Inauguration Day.
Kennedy returned to Washington in January to see Obama sworn in as president and suffered a seizure at a luncheon in the Capitol that afternoon.
"He was there when the Voting Rights Act passed," Obama told the crowd of officials, calling Kennedy a "warrior for justice."
"Right now a part of me is with him," the new president said in his first public remarks since his inauguration. "This is a joyous time, but it is also a sobering time, and my prayers are with him and his family."
Kennedy's last visit with the president was in April when Obama signed the Edward M. Kennedy Serve America Act at the SEED School in Washington. Kennedy and Obama spent time together in the Oval Office that day.
Kennedy and Obama were also together for the senator's birthday celebration earlier this year.
The two spoke on June 2 about health care and on July 10 after Mr. Obama gave the Pope a letter from Kennedy.
On Aug. 12, the president awarded Kennedy a Presidential Medal of Freedom, but Kennedy did not attend the ceremony at the White House.
The Obamas have a connection to Kennedy beyond politics. Sen. Kennedy recently gave the Obama girls, Malia and Sasha, their highly-anticipated presidential pet, Bo, a Portuguese water dog just like Kennedy's own dogs.
The president has ordered the flag at the White House and the flags throughout the federal government to half mast, spokesman Bill Burton said. The flags are also at half staff all around Oak Bluffs, where the Obamas are vacationing.