GUATEMALA CITY (Reuters) - Software guru John McAfee, who is fighting deportation to Belize, was rushed to the hospital in Guatemala on Thursday after his lawyer said he suffered two mild heart attacks earlier in the day.

Reporters saw McAfee carried out on a stretcher from an immigration service cottage where he was detained after crossing illegally into Guatemala from neighboring Belize, where police want to question him in connection with his neighbor's murder.

The 67-year-old U.S. software pioneer's hospitalization came after Guatemala denied a request for asylum.

McAfee was posting on his blog during the morning, the time his lawyer said he suffered the heart attacks.

"I don't think a heart attack prevents one from using one's blog," said the lawyer, Telesforo Guerra.

It wasn't until Thursday afternoon that he was carried out, wrapped in blanket and with his eyes shut, and taken to a police hospital.

Guerra's assistant, Karla Paz, said she had found McAfee lying on the ground, unable to move his body or speak.

McAfee was detained by Guatemalan police on Wednesday for illegally sneaking across the border with his 20-year-old girlfriend to escape authorities in Belize. He has said he fears authorities in Belize will kill him if he returns.

McAfee attended Northside High School and Roanoke College. He gave the commencement speech at Roanoke College in 2008. He is the founder of the antivirus software company McAfee Inc.

(Reporting by Lomi Kriel and Sofia Menchu; Editing by Simon Gardner and Stacey Joyce)