A statement from press secretary Joseph Mutah says Thursday night's hacking of www.nigeria.gov.ng was traced to activists who have recently attacked other governments' sites in a proclaimed fight for gay rights.
Local news reports said a message on the hacked site gave President Goodluck Jonathan 72 hours to veto a new law that would jail homosexuals.
The hacker threatened to "unleash a torrent of fury" starting with "some startling but not surprising evidence of corruption."
Mutah's statement Friday called it "a criminal attempt to blackmail countries" and said Nigerians "remain overwhelmingly opposed to the imposition of gay rights."
He says his ministry is taking measures to stem future attacks.