HAVANA (Reuters) - Former Cuban leader Fidel Castro dismissed reports that he was dead or near death in an article published on Monday in Cuba's state-run press.

He accused news agencies and enemies of Cuba of spreading "stupidities" about him, particularly a report from a Spanish newspaper last week that said he had suffered a massive stroke and was in a vegetative state.

"Birds of bad omen! I don't even remember what a headache is," he wrote.

The article in Communist Party newspaper Granma was accompanied by photographs showing him walking outside on a sunny day on what appeared to be a farm.

He wore a straw hat and red plaid shirt, used a walking cane and, in one photo, held a copy of Granma from Friday.

The photos, Castro said, were "proof of what liars they are."

Social media has been alight in recent weeks with rumors about Castro, who is 86 and has been in declining health for several years.

He ruled Cuba for 49 years before resigning in 2008, citing age and infirmity. Younger brother Raul Castro succeeded him as president.

On blogs and Twitter, he has been declared dead or near dead numerous times, spurred by a long, unexplained absence from the public eye.

Elias Jaua, a former Venezuelan vice president, said on Sunday he had met with the Cuban revolutionary leader over the weekend, showing reporters pictures of the meeting and saying Castro was in good health and lucid.

Castro had not written one of his "Reflections" opinion columns for state press since June 19 or been seen publicly since March.

His last few Reflections were also Twitter-like in their brevity and slightly oddball in content, which left Cubans wondering about their former leader's mental state.

But Castro said he had decided to stop the columns for a practical reason.

"I stopped publishing Reflections because surely it is not my role to occupy the pages of our press, dedicated to other work the country requires," he said.

As for how he spends his time now, Castro wrote, "I like to write and I write. I like to study and I study."

Castro also used the article to defend his role in the 1962 Cuban Missile Crisis, which 50 years ago this month brought the world to the brink of nuclear war when the United States discovered that the Soviet Union had placed nuclear missiles in Cuba.

Castro said Cuba viewed the missiles as necessary to stopping a U.S. invasion of the island 90 miles from Florida and had no regrets about its decision.

"Our conduct was ethically irreproachable. We will never apologize to anyone for what we did," he said.

(Reporting by Jeff Franks; editing by Patrick Graham)