A man accused of assaulting U.S. Rep. Angie Craig, D-Minnesota, in her Washington apartment building earlier this year has pleaded guilty. 

Kendrid Khalil Hamlin pleaded guilty Thursday to charges of assaulting a member of Congress and assaulting law enforcement officers. He is also accused of assaulting two police officers as they were trying to arrest him for the attack. 

‘WHAT IS THIS, A TEST?’ MEMBERS OF CONGRESS REVEAL WHETHER THEY READ THE DEBT CEILING BILL

Craig was attacked around 7:15 a.m. on Feb. 9 in the elevator of her building. She was getting coffee in the lobby when she noticed a man pacing. He got in the elevator with her and said he needed to use the bathroom and that he was coming into her apartment, a U.S. Capitol Police special agent wrote in court papers. 

Minnesota Rep. Angie Craig

Rep. Angie Craig, D-Minn., speaks during a news conference on the Protecting Access to Contraception Act of 2022 at the U.S. Capitol in Washington in 2022. A man accused of attacking the Democratic legislator has pleaded guilty.  (Reuters)

When she said he couldn't go into her apartment, he punched her in the face and grabbed her neck before she threw the hot cup of coffee at him, prosecutors said. 

Craig's chief of staff said she called 911 after the incident as the attacker fled the scene and that there was no evidence the attack was politically motivated.

Hamlin has multiple convictions, including assaulting a police officer, prosecutors said. 

CLICK HERE TO GET THE FOX NEWS APP

Craig won a third term in Congress in November in one of the most expensive House races in the country as the Republican Party hoped to flip the seat. 

The Associated Press contributed to this report.