President Barack Obama said on Wednesday he was heartbroken by the death of Senator Edward Kennedy, a longtime pillar of the Democratic Party who was a crucial supporter of his presidential candidacy.

For five decades, virtually every major piece of legislation to advance the civil rights, health and economic well being of the American people bore his name and resulted from his efforts, Obama said in a statement from the Massachusetts island of Martha's Vineyard where he is on vacation.

Kennedy, who had been battling brain cancer for more than a year, died late on Tuesday at his family compound in the nearby Cape Cod town of Hyannis Port.

White House officials said Obama was told shortly after 2 a.m. (0600 GMT) of Kennedy's death and spoke with Kennedy's wife, Victoria, about 25 minutes later.

Kennedy was a leading advocate of healthcare reform, a signature issue of Obama's presidency.

In January 2008, Kennedy endorsed Obama, who was serving his first term as a senator, for the Democratic presidential nomination. Many saw the endorsement as the passing of the political torch to a new generation.

Michelle and I were heartbroken to learn this morning of the death of our dear friend, Senator Ted Kennedy, Obama said.

I valued his wise counsel in the Senate, where, regardless of the swirl of events, he always had time for a new colleague. I cherished his confidence and momentous support in my race for the Presidency. And even as he waged a valiant struggle with a mortal illness, I've profited as President from his encouragement and wisdom, said Obama, who was elected last November and took office in January.

An important chapter in our history has come to an end. Our country has lost a great leader, who picked up the torch of his fallen brothers and became the greatest United States Senator of our time, Obama said.

(Reporting by Patricia Zengerle in Oak Bluffs; Editing by Peter Cooney)