HAVANA, Aug 17 (Reuters) - The United States pays Cuba $4,085 a month in rent for the controversial Guantanamo naval base, but Cuba has only once cashed a check in almost half a century and then only by mistake, Fidel Castro wrote in an essay published on Friday.

The ailing Cuban leader, who has not appeared in public for more than a year, said he had refused to cash the checks to protest the "illegal" U.S. occupation of the land which he said was now used for "dirty work".

"The base is needed to humiliate and to do the dirty work that occurs there," he said of the detention camp where some 355 terrorism suspects are still being held with no legal rights despite international criticism.

Castro, who turned 81 on Monday out of public sight, said the U.S. checks are made out to the "Treasurer General of the Republic," a position that ceased to exist after Cuba's 1959 revolution.

He said only one U.S. check was ever cashed -- in 1959 due to "confusion" in the heady early days of the leftist revolution.

Castro's refusal to cash the checks to protest the "illegal" occupation has been long known. In a television interview years ago, he showed the checks stuffed into a desk drawer in his office.

The final installment of Castro's long historical essay on Cuba's hostile relations with the United States -- written for future generations -- was published by the ruling Communist Party newspaper Granma.

The essay entitled "The Empire and the Independent Island" recounted Castro's view of U.S. efforts to control Cuba since U.S. troops landed on the island in the Spanish-American War that secured Cuban independence from Spain in 1898.

The United States retained 46.8 square miles (121 square kilometers) at the entrance to Guantanamo Bay in eastern Cuba for a naval base, which has been used as a prison camp for Taliban and al Qaeda terrorism suspects since the Afghanistan war following the Sept. 11 attacks in 2001.

The base was initially a coaling station for the U.S. Navy to protect the approaches to the Panama Canal.

Castro said the enclave was "illegally usurped" by the United States, adding that the base no longer had any strategic military purpose in the age of nuclear-powered aircraft carriers packed with fast fighter-bombers.

"If we have to wait for the collapse of the (capitalist) system, we will wait," Castro wrote. He said Cuba was always on alert to the threat of a U.S. invasion.

Castro handed over power to his brother Raul on July 26 last year after undergoing emergency intestinal surgery. His health is a state secret, but few Cubans expect him to return to office.

The Cuban leader, the last of the major Cold War figures still alive, is seen as a Stalinist tyrant by his enemies but is widely admired in the Third World for standing up to the United States, a David-versus-Goliath role he has relished.