The state investigator fired for spying on the Twitter account of Oregon's top civil rights lawyer sued his former bosses Tuesday, claiming his snooping was officially sanctioned and his termination was unjustified.

Oregon Attorney General Ellen Rosenblum fired investigator James R. Williams in August, almost a year after he reported to his bosses that Erious Johnson Jr., director of civil rights for the Oregon Department of Justice, used the Black Lives Matter hashtag and tweeted about the rap group Public Enemy.

Williams was spying on the state's top civil rights lawyer, who was also his own colleague.

The matter became public Nov. 10, when the Urban League of Portland, the American Civil Liberties Union of Oregon and other groups wrote to Rosenblum asking for an investigation into the matter. Urban League of Portland CEO Nkenge Harmon Johnson is married to Erious Johnson.

At the time, Rosenblum called Williams' investigation of Johnson "an act of profiling."

Johnson has sued Rosenblum and other officials in October for civil rights violations, using that very reason.

But Williams claims in his own lawsuit that he was just doing his job.

He supports his claim with a narrative of how he found Johnson's tweets that is as confusing as it is intriguing. In it, he suggests that federal officials instructed him to monitor potential racial unrest fueled by a Hollywood biopic.

In September 2015, Williams says officials with the Bonneville Power Administration "contacted" him with a tip to investigate possible planned protests around the release of the N.W.A. movie Straight Outta Compton.

"At that time there was illegal activity centered around the movement "blacklivesmatter", including violence and civil disobedience during protests," Williams claims in his lawsuit. "Portland had also experienced such protests."

This claim, while strange, may be partly explained by the fact that Williams worked at Oregon's Titan Fusion Center. The fusion centers collate information from local, state and federal law-enforcement agencies so they can better coordinate their operations, both in monitoring potential terrorists and pursuing more routine issues, such as drug trafficking. Oregon's Fusion Center opened in 2007, operating inside the DOJ's criminal justice division.

That same September, Williams used the state's Digital Stakeout software to search the terms #blacklivesmatter and #fuckthepolice, "as well as other known organizations involved or associated with criminal activity," the lawsuit states.

Williams says he found "potentially racist and anti-police postings" on Johnson's twitter account. (An independent investigation later found that Johnson's tweets were of Public Enemy's band logo.)

The lawsuit says that Special Agent in Charge Dave Kirby told him to give Rosenblum a memo detailing his investigation, which he says he did.

Six weeks later, Williams says his bosses put him on administrative leave.

An Oregon Department of Justice spokeswoman could not immediately be reached for comment this evening.

In the lawsuit, Williams also suggests that Rosenblum tipped off the press. He cites her marriage to the co-owner of WW's parent company, Richard Meeker. Williams points to an article that WW posted at noon on Nov. 10, announcing that he had been "suspended." Williams claims his bosses told him about what they termed "administrative leave" five hours later.

(Editor's note: It's true that Rosenblum is married to Meeker. It is also true that WW reported extensively about the spying on Johnson. The implication that Rosenblum was the source is false.)

Williams also adds that it's not fair that he was fired for racially profiling the state's civil rights director, because an internal investigation recommended only additional training, not termination.

Williams demands unspecified damages for mental anguish, humiliation and loss of enjoyment of life.