MEXICO CITY — The antivirus software pioneer John McAfee was arrested in Guatemala City on Wednesday after he slipped over the border from his home in Belize where police want to question him in their investigation of the murder of his neighbor.

The interior minister, Mauricio Lopez Bonilla, told The Associated Press that Mr. McAfee, 67, had been arrested on charges of entering Guatemala illegally. He said that Mr. McAfee had been arrested at a hotel in the capital and taken to a detention center for migrants who are in the nation illegally.

Mr. McAfee had been on the run for almost a month since his neighbor, Gregory Faull, on the Belizean island of Ambergris Caye was found dead at his home on Nov. 11. Police there cited Mr. McAfee as a “person of interest” in their investigation, but Mr. McAfee disapppeared.

But he did not disappear from the Internet. He kept up a continuous stream of comment on his blog and on Twitter, accusing the Belizean authorities of persecuting him.