Only God can judge him — but the governor of Iowa can fire him.

A Tupac Shakur superfan who worked as the director of Iowa’s social services agency was forced out of the position last month after two years of sending emails to other workers about the slain rapper, an investigation by the Associated Press revealed.

Jerry Foxhoven, 66, routinely sent other employees messages that included inspirational quotes from Tupac songs and other messages about the rapper, according to 350 pages of email reviewed by the news agency.

Foxhaven also hosted “Tupac Fridays” in his office, where he would play Tupac’s raps, and even celebrated his 65th birthday with Tupac-themed cookies.

Some staffers at the agency thanked Foxhaven for the notes and praised him for the positive attitude his Tupac emails brought to the work environment.

“I love your 2pac messages … and the fact that you still send them (despite the haters) makes me appreciate them even more,” employee Lisa Bender wrote to him in an undated email.

But at least one employee complained to state lawmakers about the hip-hop messages last year.

Then, last month, Foxhaven sent an agency-wide email telling workers to celebrate Tupac’s birthday over a weekend. Iowa Gov. Kim Reynolds told him to resign from his post his next scheduled work day.

The governor’s office would not elaborate on whether his Tupac emails played a role in his resignation.

Foxhaven said Reynolds decided to “go in a different direction” with the agency and doubts his emails had any influence on the decision.

With Post wires