The former guerrilla fighters who founded Cuba's single-party government will hold power for years to come after a twice-a-decade Communist Party congress kept President Raul Castro and his hardline deputy in the top leadership positions.

Fidel Castro, who held power for nearly five decades before ill health led him to make way for his brother, delivered a valedictory speech to the congress Tuesday and called on it to fight for his communist ideals despite the fact that he is nearing the end of his life.

"I'll be 90 years old soon," Castro said in his most extensive public appearance in years. "Soon I'll be like all the others. The time will come for all of us, but the ideas of the Cuban Communists will remain as proof on this planet that if they are worked at with fervor and dignity, they can produce the material and cultural goods that human beings need, and we need to fight without a truce to obtain them."

Raul Castro, 84, said he would remain the party's first secretary and Jose Ramon Machado Ventura, 85, would hold the post of second secretary for at least part of a second five-year term.

Castro currently is both president and party first secretary. The decision means he could hold a Communist Party position at least as powerful as the presidency even after he is presumably replaced by a younger president in 2018. Castro indicated that he and Machado may also step down before the next congress in 2021, saying this year's session was the last to be led by Cuba's revolutionary generation.

Machado Ventura, who fought alongside the Castro brothers to overthrow dictator Fulgencio Batista in 1959, is known as an enforcer of Communist Party orthodoxy and voice against some of the biggest recent economic reforms.

Despite the ascension of five younger party officials, including three women, to the party's powerful 17-member Political Bureau, the day's events disappointed many Cubans who had been hoping for bigger changes at the top of the single-party state.

"I would have liked younger people with fresh minds," said Luis Lai, a 31-year-old printing-company worker. "The same party, but able to articulate ideas of people of my generation. Older people should retire."

Fifty-five years after Fidel Castro began installing a single-party system and centrally planned economy, younger Cubans complain bitterly about low state salaries of about $25 a month that leave them struggling to afford food and other staple goods. Cuba's creaky state-run media and cultural institutions compete with flashy foreign programming shared online and on memory drives passed hand-to-hand. Emigration to the United States and other countries has soared to one of its highest points since the revolution.

Limited openings to private enterprise have stalled, and the government describes capitalism as a threat even as it appears unable to increase productivity in Cuba's inefficient, theft-plagued networks of state-run enterprises.

The ideological gulf between government and people widened last month when President Barack Obama became the first U.S. leader to visit Cuba in nearly 90 years. He gave a widely praised speech live on state television urging Cubans to forget the history of hostility between the U.S. and Cuba and move toward a new era of normal diplomatic and economic relations.

The Cuban government offered little unified response until the Communist Party's Seventh Party Congress began Saturday, and one high-ranking official after another warned that the U.S. was still an enemy that wants to take control of Cuba. They said Obama's trip represented an ideological "attack."

Shortly after the congress ended, government-run television showed rare images of 89-year-old Fidel Castro seated at the dais in Havana's Convention Palace, dressed in a plaid shirt and sweat top and speaking to the crowd in a strong if occasionally trembling voice. State television showed at least one delegate tearful with emotion, and the crowd greeting the revolutionary leader with shouts of "Fidel!"

"This may be one of the last times I speak in this room," Fidel Castro said. "We must tell our brothers in Latin America and the world that the Cuban people will be victorious."

___

Michael Weissenstein on Twitter: https://twitter.com/mweissenstein

___

Associated Press writer Andrea Rodriguez contributed to this report.