WASHINGTON (Reuters) - U.S. Homeland Security Secretary Jeh Johnson and FBI Director James Comey told lawmakers on Thursday that they were preparing their agencies for the possibility of violence, both from unruly demonstrators and terrorists, at the upcoming Republican and Democratic nominating conventions.

Speaking before the House Homeland Security Committee, Johnson said he was concerned that demonstrations at the events could get out of hand.

In an interview with Reuters following his testimony, Johnson said he knew of no specific or credible threat to either convention but that it was important to be prepared.

Johnson said the Department of Homeland Security would be sending more than 3,000 personnel to each convention.

Recent clashes between attendees and protesters at rallies for presumptive Republican presidential nominee Donald Trump have led to physical assaults and arrests.

The Republican National Convention being held July 18-21 in Cleveland and the Democratic National Convention in Philadelphia from July 25-28 follow a string of high-profile shootings.

In June, an Islamic State sympathizer committed the deadliest mass shooting in U.S. history, killing 49 people in a gay nightclub in Orlando, Florida. Last week, five police officers in Dallas were killed by a black man angry about police shootings of unarmed black men.

Comey told the committee that the Federal Bureau of Investigation was monitoring the threat of violence at the conventions “very, very carefully.”

“Anytime there is a national spotlight on a political event in the United States, there is a risk that groups that aspire to do just that, engage in acts of domestic terrorism, will be attracted,” Comey said.