CHARLOTTE, North Carolina (Reuters) - The grandmother who helped raise Democratic U.S. presidential candidate Barack Obama and whom he had credited with shaping his values has died of cancer, he said in a statement on Monday.

Democratic presidential candidate Senator Barack Obama is seen posing with his maternal grandparents Stanley and Madelyn Dunham in an undated family snapshot released by his presidential campaign, February 4, 2008. REUTERS/Obama For America/Handout

The news came on the day before the presidential election and a little more than a week after Obama interrupted his White House campaign to say goodbye to her in Hawaii.

Madelyn Dunham, 86, died peacefully at her home in Honolulu.

“She was the cornerstone of our family, and a woman of extraordinary accomplishment, strength and humility,” Obama and his sister, Maya Soetoro-Ng, said in a statement. “She was the person who encouraged and allowed us to take chances.”

Dunham helped raise Obama from the age of 10 while his mother was working in Indonesia, and Obama took an emotional 22-hour trip to visit her on October 23 and 24.

He said afterward his grandmother had been flooded with cards, flowers and well-wishes from around the country, and he regularly thanked crowds at his campaign rallies for their prayers.

“Our family wants to thank all of those who sent flowers, cards, well-wishes and prayers during this difficult time,” the statement said.

Slideshow ( 5 images )

“It brought our grandmother and us great comfort. Our grandmother was a private woman, and we will respect her wish for a small private ceremony to be held at a later date,” the statement said.

Dunham had followed Obama’s presidential bid with great interest, and her death comes one day before U.S. voters will render their verdict in the race between Obama and Republican John McCain.

McCain and his wife, Cindy, issued a statement of condolence.

“Our thoughts and prayers go out to them as they remember and celebrate the life of someone who had such a profound impact in their lives,” the McCains said.

Obama affectionately called his grandmother “Toot” -- short for “tutu,” the Hawaiian word for grandmother.

He spoke of her often on the campaign trail, mentioning that she worked in a bomber assembly plant during World War Two. Later, she worked as a secretary in a bank and was eventually promoted to vice president.

She helped put Obama through private school in Hawaii and Obama has often credited her with instilling in him the Midwestern pragmatism she acquired as a Kansas native.

Dunham had recently broken her hip but the campaign had refused to comment on reports she was suffering from cancer.

Obama received the news of his grandmother’s death as he took a final campaign swing through Florida and North Carolina.

Stopping at one of his campaign’s volunteer offices in Charlotte, Obama seemed more downbeat than usual but he made some calls encouraging voters to get to the polls.

One supporter at the office broke down in tears at her surprise at seeing him there and he gave her a warm hug but did not mention the news about his grandmother.