In the 2014 comic book series Loki: Agent of Asgard, Loki alternated between being a male and a female quite fluidly, but on a particular occasion prior to that he became a woman for quite some time. Beings in Asgard generally come back to life in reincarnated forms and, in this particular instance, Loki perished in one of the Ragnarok events which regularly kill off Asgardian characters and, despite being reincarnated as a male, actually hid his essence inside the reborn body of Thor's lover Sif in order to manipulate a series of events that would see him gain the throne of Asgard. He has also, in an attempt to throw Norman Osborn off balance in his role as leader of the Cabal, posed as the Scarlet Witch in order to manipulate a team of Avengers. In a nutshell, Loki is no stranger to being female.