Aminu posted a Facebook comment last month in which he called on Allah to curse Jigawa state governor Sule Lamindo 'and all his useless friends' Photograph: Leon Neal/AFP/Getty Images

A man who used Facebook to put a curse on a Nigerian politician has been jailed, raising fears of a crackdown on freedom of speech ahead of crucial elections.

Moukhtar Ibrahim Aminu was arrested in the northern state of Jigawa for being a public nuisance, police spokesman Abdul Jinjiri said.

Aminu was held in prison for several days before appearing in a local court, where he was charged with defamation and sent back to jail pending trial.

Jinjiri said Aminu's crime stemmed from a comment he posted on Facebook on 18 January. Writing in the local Hausa language, Aminu asked that divine punishment be levelled against Sule Lamido, the governor of Jigawa and a co-founder of the ruling People's Democratic party.

"Allah curse Sule Lamido and all his useless friends," the posting said. "Allah make Sule Lamido and his friend useless."

Such curses can carry tremendous importance in Nigeria, a nation of 150m people where animist beliefs mix with Christianity and Islam. Some believe the curses can damage them for life, while others take them as an insult.

The case has prompted furious comments on governor Lamido's Facebook wall. One protester, Gerald C Azike, posted: "Your excellency, if what I read about your detention of a young man was because of what he said on your face book [sic], then that is being so callous. How can you arrogate such a power to yourself in this present world? It is only because it is in Nigeria where anything goes that you can do that."

But he added: "In Nigeria, a lot of illegalities are committed by the government."

Umar Kyari, a spokesman for Lamido, insisted the governor's office had no hand in the arrest. "This story is between the police and the boy. This story is not between the governor and the boy per se. It is left to the legal system to either free or detain him," he told the Associated Press