The attack happened on Thursday night and normalcy only returned to the site at about 11.00 p.m. on Thursday. It is not known whether it was the government that regained control or whether the attackers simply suspended the attack.
The anti-gay bill, passed by Nigeria's National Assembly and generously supported by Nigerians, seeks to jail convicted homosexuals for 14 years.
"Nobody should live in fear of being jailed, when their only action is loving another consenting adult, regardless of gender," the Irish hacker, Paddyhack said.
A message left on the defaced website gave the president 72 hours to "renounce and veto this Bill... "
"Failure to follow our order will unleash a torrent of fury aimed directly at the direction of your administration, starting with some startling but unsurprising evidence of corruption in your ranks,"the hacker, who also claims to be a member of the global Anonymous group, said.
"No need to start destroying evidence. I already have it," the hacker declared.
The hacked website, Nigeria.gov.ng, is Nigeria's official website. It is the equivalent of UK's gov.uk and U.S' USA.gov. It is managed by Nigeria's information ministry.
The Thursday night attack was a continuation of an #opNigeria the attacker launched on July 1. Despite announcing his intention hours before hijacking the website, Nigeria's Information Ministry's web administrators appear unable to avert the attack.
"Just over two hours to launch of #OpNigeria," the attacker announced in his twitter diary.
The spokesperson of the ministry, Joseph Mutuah, could not explain the attacks when pressed for reasons the government is unable to provide appropriate security for its web infrastructure.
He likened it to armed robbers breaking into one's property. "They are hackers," he said.
The ICT department of the Information Ministry received N63.5 million from the national treasury this year. Of this amount, N10 million was set aside for the management of the website.
Nigeria cyber protest culture
Although the web profile of the attack suggests Irish origins, it is difficult to isolate the incident from Nigeria's growing culture of cyber activism.
Cyber warfare is fast becoming a major protest tool for Nigeria's social media community. Besides using the Internet to disseminate information, protesters use hacking skills to get government officials' attention to civil issues.
After playing a major role in the global Occupy Movement, the Internet anarchy group, called Anarchy, is lending support to clones in developing countries, including Nigeria.
Various clones operating in Nigeria have carried out operations against government Internet infrastructures as a means of protesting unfavourable policies, mostly as support for a protest in the social media community.
Early in January 2012, during the Occupy Nigeria protest, Nigeria Cyber Hack-activists, the lead clone of Anonymous, began a "Tell Them How You Feel" campaign. The group bombarded mobile phone lines of Nigerian politicians, lawmakers and top government functionaries - including the Vice president - with a million text messages each.
Thereafter, these phone numbers were published by the group on social media, inviting Nigerians to call or text them to denounce the policy.
Nigeria Cyber Hack-activist, believed to be made up of mostly young people, have been carrying out attacks on government Internet infrastructure since 2010. It was a means of protesting the lavish expenditure of the government on Nigeria's 50th anniversary - in the face of worsening poverty and infrastructure decay. The group launched attacks that crippled many government websites.
The group has a history of defacing government websites. In May 2011, they ruined several government websites, including the National Assembly's, in a campaign - Op-Nigeria - targeted at forcing government to cut waste and sign the Freedom of Information Act.
After the Occupy Nigeria protest, Nigeria Cyber Hack-activists announced it was planning an attack on the Economic and Financial Crimes Commission's website in a bid to push the anti-corruption commission into arresting Messrs Femi Otedola and Mike Adenuga, earlier fingered as members of a cabal that have fuelled corruption within the oil industry.
But a day before the group's planned attack, the EFCC website was brought down.
No other group claimed responsibility for the attack.
The unannounced attack on EFCC's website suggested there were other hack groups operating in Nigeria.
In 2012 alone, up to eight hack groups, with focused operations on Nigeria, sprang up in the cyberspace - including Anonymous Nigeria, Ibomhacktivist, and the Op-Arik - used to taunt Arik Air, Nigeria's leading airline, for poor customer services.
The radical, faceless, and irrepressible groups threatened to upload stuxnet - a deadly computer worm discovered in 2010 - on Shell flow station in the oil rich Niger Delta after the government threatened them with treason and arrests.
They warned that Nigeria's cyber infrastructure was insecure and would overthrow it if the government does not meet their demands to stop corruption and political patronage in Nigeria, cut waste in governance, and prosecute members of the cabal.
Although the Nigerian government is yet to meet these conditions, the hackers have since gone under, remaining silent even on the latest attacks. It is now unclear whether the latest vandalization of Nigeria's cyber infrastructure is being carried out by them or foreign cyber-warlords.
Related stories: 92 percent of Nigerians support anit-gay law