Capitol Police officer Michael Fanone, who was pulled into the Jan. 6 mob and violently attacked, announced his resignation Monday and will join CNN as a law enforcement expert.

Fanone, 41, said he will leave the force by the end of December. He returned to the Capitol Police in September and received his weapon and badge back earlier in December.

CNN confirmed Fanone will join the network as an on-air contributor.

A 20-year police veteran, Fanone was pulled into the Capitol riot crowd and repeatedly beaten and electroshocked, suffering a heart attack. He also suffered a traumatic brain injury. The crowd threatened to shoot him with his own weapon.

Fanone, who testified before Congress in July, has often appeared as a guest on CNN and MSNBC. He highlighted the seriousness of the attack on the Capitol as certain politicians and news anchors, particularly at Fox News and other right-wing media outlets, tried to downplay the events.

He said his decision to leave was partly due to the animosity from his fellow officers, who disagreed with his decision to go public about what transpired on Jan. 6.

“Clearly there are some members of our department who feel their oath is to Donald Trump and not to the Constitution,” Fanone told The Washington Post. “I no longer felt like I could trust my fellow officers and decided it was time to make a change.”

Many officers have been very public about what occurred on Jan. 6 at the Capitol. Capitol Police officer Eugene Goodman, who led rioters away to clear a path for senators to get to safety, has also received public attention for his actions.

Since the attack, four officers with the Capitol Police have committed suicide.