The director of Iowa's social services agency was a huge fan of the late rapper Tupac Shakur, and he frequently let his subordinates know it.

Emails obtained by The Associated Press show that Iowa Department of Human Services Director Jerry Foxhoven routinely sent messages to employees lauding Shakur's music and lyrics even after at least one complained to lawmakers. Then last month, he sent another such email to all 4,300 agency employees. He was abruptly ousted from his job the next work day.

Foxhoven, 66, told employees that he had been a huge fan of the hip-hop artist for years. He hosted weekly "Tupac Fridays" to play his music in the office. He traded lyrics with employees and he marked his own 65th birthday with Shakur-themed cookies, including ones decorated with the words "Thug life."

The agency released 350 pages of emails with the words "Tupac" or "2Pac" sent to and from Foxhoven during his two-year tenure in response to an AP request. They show that Foxhoven marked the anniversary of Shakur's death, shared one of his lyrics about love on Valentine's Day and used the rapper's image to try to improve the agency's culture. He told colleagues he was inspired by lyrics that included: "It's time for us as a people to start makin' some changes."

While some employees praised Foxhoven for using Shakur to inject levity and inspiration into a stressful workplace, at least one complained to lawmakers about it last year, according to the emails provided under the open records law. And when Gov. Kim Reynolds told Foxhoven to resign on June 17, it was his first work day after he sent an agency-wide email telling employees to mark Shakur's birthday over the weekend by listening to one of his songs.

The timing of Foxhoven's mass email, which featured a large image of the rapper smiling, and his resignation has fueled speculation among employees that the two events are linked. But like the question of who fatally shot Shakur in Las Vegas in 1996, the reason for Foxhoven's forced departure remains a mystery.

A spokesman for the governor wouldn't confirm or deny that Foxhoven's email figured into her surprise request for his resignation.

"As the governor has said, a lot of factors contributed to the resignation of Jerry Foxhoven and now Gov. Reynolds is looking forward to taking DHS in a new direction," said spokesman Pat Garrett.

The governor's office has refused to elaborate on those factors, despite an Iowa law that requires state agencies to release the "documented reasons and rationale" when employees resign instead of being terminated.

Foxhoven's ouster came amid multiple controversies involving the agency, which has a nearly $7 billion annual budget. They included difficult contract negotiations with managed care companies that run the Medicaid program, a trial detailing alleged mistreatment of boys at a state juvenile home, and an uptick in deaths at a center for the disabled. Still, Foxhoven's job had not appeared to be in danger.

Reynolds had appointed Foxhoven, a longtime Drake University law professor, to run the agency in 2017 amid concerns about its handling of cases of children who died from abuse and neglect.

Foxhoven said in a text message that he believed Reynolds had made the decision to "go in a different direction" before he sent the June 14 email. He said he wasn't given a reason for the resignation request but that he doubted Shakur was a factor.

The email included what Foxhoven called an inspirational quote from the artist: "Pay no mind to those who talk behind your back, it simply means that you are 2 steps ahead." Foxhoven noted that, in addition to Shakur's birthday, he was celebrating his two-year anniversary as director and he thanked the staff for their work.

Foxhoven said he sent the message, which was similar to an email he sent the prior year to mark the day, to break down racist stereotypes about rap music.

Several employees reacted positively with notes to Foxhoven — but one noted that the view wasn't universally shared.

"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.

"I agree totally. I am going to hang in there on him -- despite all of the naysayers," Foxhoven responded.