HAVANA -- Cuban revolutionary leader Fidel Castro delivered a valedictory speech Tuesday to the Communist Party that he put in power a half-century ago, telling party members he is nearing the end of his life and exhorting them to help his ideas survive.

"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."

CBS News reported on Saturday that Cuba's Communist Party meeting may be the last with revolutionary leaders.

Castro spoke as the government announced that his brother Raul will retain the Cuban Communist Party's highest post alongside his hardline second-in-command. That announcement and Fidel Castro's speech together delivered a resounding message that the island's revolutionary generation will remain in control even as its members age and die, relations with the U.S. are normalized, and popular dissatisfaction grows over the country's economic performance.

Get Breaking News Delivered to Your Inbox

There is no foreign press access to the event that brought together 1,000 delegates and 280 invited guests, according to the party's daily newspaper Granma.

Party congresses are supposed to be held every five years. The last congress, in 2011, was preceded by an extensive nationwide debate on the guidelines for Cuba's economic and social development as it seeks a new form of socialism that will pull the Cuban economy out of the doldrums and resolve critical social issues such as a housing shortage, inadequate pay, faltering production and lack of cash for investments in crucial economic sectors, CBS News reported.

Fifty-five years after Fidel Castro declared that Cuba's revolution was socialist and began installing a single-party system and centrally planned economy, the Cuban government is battling a deep crisis of credibility.

With no memory of the revolution's heady first decades, 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 and delivered 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 Mr. Obama's trip represented an ideological "attack."

That defensive stance was reinforced Tuesday as the congress ended and the government said Raul Castro, 84, would remain the party's first secretary and Jose Ramon Machado Ventura 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 Castro 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 was the last to be led by Cuba's revolutionary generation.

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

He often has been employed by the Castros to impose order in areas seen as lacking discipline, most recently touring the country to crack down on private sellers of fruits, vegetables and other agricultural goods. While Raul Castro opened Cuba's faltering agricultural economy to private enterprise, the government has blamed a new class of private farmers and produce merchants for a rise in prices.

Jon Lee Anderson, a staff writer at The New Yorker who is writing a biography of Fidel Castro, called the day's events "a way of restoring some kind of essential revolutionary presence or muscle in the room after the star-struck effect of Obama."

The Cuban government appears to be engaging in "overcompensation for being bowled over a little bit by Mr. Obama's unexpectedly elegant and charismatic performance in Havana," said Anderson, who covered the visit. "Cubans who aren't prepared for the full extent of what he was saying, it took them aback."

Shortly after the congress ended Tuesday afternoon, 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."

The party congress had been criticized for secrecy and a lack of discussion about substantive new reforms. Castro's speech and his brother's promise that more extensive public debate would come in the weeks and months after the congress appeared to have at least temporarily quelled discontent among the party ranks.

"The Cuban people are followers of Fidel and he's a force that still has a lot of power," said Francisco Rodríguez, a party member who had publicly criticized the secrecy of the congress. "It's easy to love Fidel now that he doesn't have a public position. He's a person who always had a coherent idea and that makes him an exalted figure."