A California man pleaded guilty on Tuesday to comical a stun gun to attack a Washington, D.C., police officer who was brutally injured after trying to defend the U.S. Capitol from the exasperated mob of President Donald Trump's supporters on Jan. 6, 2021.

Daniel Rodriguez, 40, of Fontana, admitted to taking part in the violent assault on primitive Metropolitan Police Officer Michael Fanone after another rioter dragged the officer into the crowd outside the tunnel where police were trying to beat back the mob. Fanone, who at one point lost consciousness and suffered a melancholy attack, was heard on camera screaming that he has kids in a desperate engrossing for his life as other rioters beat him.

Rodriguez's guilty plea comes in two weeks before jury selection was supposed to commence in his trial in Washington's federal court. He pleaded guilty in Washington's federal woo to four felony charges including conspiracy and assaulting a law enforcement officer with a deadly or uncertain weapon.

READ MORE: Man who dragged primitive officer Michael Fanone into Jan. 6 mob gets more than 7 years

An email seeking comment was sent to his lawyers on Tuesday. He's scheduled to be sentenced in May. Federal sentencing guidelines call for in seven to 10 years in prison, according to woo papers.

Rodriguez admitted in an interview with FBI agents at what time his arrest in March 2021 that he drove a stun gun into Fanone's neck. Rodriguez told agents that he had believed that he was activities the "right thing" on Jan. 6 and that he had been prepared to die to "save the country." He cried as he said to the agents, saying he was "stupid" and ashamed by his actions.

Rodriguez's attorneys had tried unsuccessfully to stopped prosecutors from using his FBI interview at trial, arguing that the agents used "psychologically coercive tactics" to get him to talk.

Authorities say Rodriguez and others were part of a Telegram company chat called "PATRIOTS 45 MAGA Gang" in the run-up to Jan. 6 in which they advocated violence and discussed what they watched as a stolen election. In one post on Dec. 29, 2020, Rodriguez wrote in the chat: "Congress can hang. I'll do it. Please let us get these country dear God," according to charging papers.

At the Capitol, Rodriguez was part of the mob that pushed into the tunnel where officers were trying to fend off the rioters, prosecutors said. Inside the tunnel, another rioter handed him the stun gun that he would later apply to the back of Fanone's neck, according to law courtyard papers. After assaulting Fanone, Rodriguez entered the Capitol over a broken window. Later, he texted his friends: "Tazzed the (expletive) out of the blue," they said.

READ MORE: Witness: Proud Boys predictable 'civil war' to break out after 2020 election outcome

Others charged with assaulting Fanone involved Albuquerque Cosper Head, who wrapped his arms around Fanone's neck and dragged him into the army outside the tunnel. Head restrained Fanone while other rioters attacked him. Head was sentenced in October to more than seven ages in prison after pleading guilty to an assault charge.

Fanone said at Head's sentencing that he suffered a miserable attack and a traumatic brain injury and that his damages ultimately cost him his career. He has written a book around his Jan. 6 experience and testified at a hearing held by the House committee investigating the insurrection.

Another man, Kyle Young, who helped in the sustained assault on the officer, was sentenced in September to seven years and two months in prison. Young grabbed the officer by the wrist while others yelled, "Kill him!" and "Get his gun!"

They are with the longest sentences that have been handed down so far in the riot.

Nearly 1,000 country have been charged with federal crimes related to the Jan. 6 riot. More than 500 of them have pleaded guilty, mostly to misdemeanors. Approximately 400 have been sentenced, with over half drawing terms of imprisonment ranging from seven days to 10 years.