HAVANA - An ailing, 81-year-old Fidel Castro resigned as Cuba's president Tuesday after nearly a half-century in power, saying he will not accept a new term when parliament meets Sunday. The end of Castro's rule — the longest in the world for a head of government — frees his 76-year-old brother Raul to implement reforms he has hinted at since taking over as acting president when Fidel Castro fell ill in July 2006. President Bush said he hopes the resignation signals the beginning of a democratic transition. "My wishes have always been to discharge my duties to my last breath," Castro wrote in a letter published Tuesday in the online edition of the Communist Party daily Granma. But, he wrote, "it would be a betrayal to my conscience to accept a responsibility requiring more mobility and dedication than I am physically able to offer." In the pre-dawn hours, most Cubans were unaware of Castro's message. Havana's streets were quiet, and there was no movement at several party-run neighborhood watch groups in Old Havana. It wasn't until 5 a.m., several hours after Castro's message was posted on the internet, that official radio began reading the missive to early risers. Castro temporarily ceded his powers to his brother on July 31, 2006, when he announced that he had undergone intestinal surgery. Since then, the elder Castro has not been seen in public, appearing only sporadically in official photographs and videotapes and publishing dense essays about mostly international themes as his younger brother has consolidated his rule. There had been widespread speculation about whether Castro would continue as president when the new National Assembly meets Sunday to pick the country's top leadership. Castro has been Cuba's unchallenged leader since 1959 — monarchs excepted, he was the world's longest ruling head of state. Castro said Cuban officials had wanted him to remain in power after his surgery. "It was an uncomfortable situation for me vis-a-vis an adversary that had done everything possible to get rid of me, and I felt reluctant to comply," he said in a reference to the United States. Castro remains a member of parliament and is likely to be elected to the 31-member Council of State on Sunday, though he will no longer be its president. Raul Castro's wife, Vilma Espin, maintained her council seat until her death last year even though she was too sick to attend meetings for many months. The resignation opens the path for Raul Castro's succession to the presidency, and the full autonomy he has lacked in leading a caretaker government. The younger Castro has raised expectations among Cubans for modest economic and other reforms, stating last year that the country requires unspecified "structural changes" and acknowledging that government wages that average about $19 (euro13) a month do not satisfy basic needs. As first vice president of Cuba's Council of State, Raul Castro was his brother's constitutionally designated successor and appears to be a shoo-in for the presidential post when the council meets Sunday. More uncertain is who will be chosen as Raul's new successor, although 56-year-old council Vice President Carlos Lage, who is Cuba's de facto prime minister, is a strong possibility. Bush, traveling in Rwanda, pledged to "help the people of Cuba realize the blessings of liberty." "The international community should work with the Cuban people to begin to build institutions that are necessary for democracy," he said. "Eventually, this transition ought to lead to free and fair elections — and I mean free, and I mean fair — not these kind of staged elections that the Castro brothers try to foist off as true democracy." The United States built a detailed plan in 2005 for American assistance to ensure a democratic transition on the island of 11.2 million people after Castro's death. But Cuban officials have insisted that the island's socialist political and economic systems will outlive Castro. "The adversary to be defeated is extremely strong," Castro wrote Tuesday. "However, we have been able to keep it at bay for half a century." Castro rose to power on New Year's Day 1959 and reshaped Cuba into a communist state 90 miles from U.S. shores. The fiery guerrilla leader survived assassination attempts, a CIA-backed invasion and a missile crisis that brought the world to the brink of nuclear war. Ten U.S. administrations tried to topple him, most famously in the disastrous Bay of Pigs invasion of 1961. His ironclad rule ensured Cuba remained communist long after the breakup of the Soviet Union and the collapse of communism across Eastern Europe. Castro's supporters admired his ability to provide a high level of health care and education for citizens while remaining fully independent of the United States. His detractors called him a dictator whose totalitarian government systematically denied individual freedoms and civil liberties such as speech, movement and assembly. The United States was the first country to recognize Castro's government, but the countries soon clashed as Castro seized American property and invited Soviet aid. On April 16, 1961, Castro declared his revolution to be socialist. A day later, he defeated the CIA-backed Bay of Pigs invasion. The United States squeezed Cuba's economy and the CIA plotted to kill Castro. Hostility reached its peak with the 1962 Cuban missile crisis. The collapse of the Soviet Union sent Cuba into economic crisis, but the economy recovered in the late 1990s with a tourism boom.