Stein-Robin Kleven Bergh, who is also a politician for the Progress Party, has been off work since the police force in Hedmark moved to sack him two months.
Now, however, it has emerged that his employers forgot to attach a formal justification to their dismissal, rendering it invalid.
"It feels really great to make this breakthrough," Kleven Bergh told the Glomsdalen newspaper.
Kari Anne Dobloug, head of communications at the Hedmark police, said that the police had yet to decide how to respond.
"We tried to undo what we had done wrong. But the council said it was too late," she said "In theory, he has now got his job back. The Chief of Police is travelling. Once he is back at work tomorrow, we will sit down and look at how to deal with the matter."
As well as insulting the then Prime Minister Jens Stoltenberg, Bergh also made a string of racist jokes on Facebook .
"Spring has arrived and asylum seekers start cycling along the roads again," a now-deleted comment from April 2011 on his Facebook page read. "Be very careful you do not run them over. It might be your bike!"
"How do you spot that a Muslim has crept into the sky?" he posted in September 2010. "Well, Taurus, Aries, Leo and Capricorn have been Halal-slaughtered…Libra[the scales} have been stolen, Virgo [the maiden]and Gemini [the twins] have been raped, and the plough is missing four wheels. "
He joked in April 2011 that he had taken his dog to try and get social security benefits, and been turned down.
"Why?" I said. "Surely he can get social security in exactly the same way as all the others: He's lazy, he's unemployed, he does not speak Norwegian, and he's here without knowing who his parents are."