Rights groups have criticised the arrest of Walid Husay, 26, as a demonstration of the limits on free speech under the Western-backed Palestinian Authority, which has trawled internet sites such as Facebook as part of a crackdown on dissent and unpopular views.
Husayin - who had called the Muslim God a "primitive Bedouin" and Islam a religion of "irrationality and ignorance" - apologised in a letter to his family and to all Palestinians and sought forgiveness for what he called his "stupidity".
"I apologise for the offence I have caused against the monotheistic faiths, particularly Islam," the letter read.
Palestinian military police arrested Husayin on 31 October after he posted comments deemed offensive to Islam on his Facebook page and blog. Defaming Islam is a crime in the West Bank.
A friend said Husayin posted the apology on his blog on 29 November with the hope that it would lead to his release.
He posted the apology from a Palestinian military prison in the northern West Bank town of Qalqilya, his hometown.
He has yet to be charged, Palestinian military spokesman Ahmed Mubayad said yesterday. He hinted Husayin could be released in the coming days by saying: "There'll be something positive."
Husayin's earlier entries attacking Islam on an Arabic-language blog have been taken down, though his remarks in an English-language post are still online.
New York-based Human Rights Watch criticised Husayin's detention as a violation of freedom of expression.