Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Two FBI agents were shot at a barricaded home not far from the protest-wracked St. Louis suburb of Ferguson early Wednesday, police said. An FBI official told NBC News that it may have been an attempt at "suicide by cop."

One agent was struck in the shoulder and the other in the leg while helping University City police prepare to make an arrest. They were taken to a hospital for surgery and were expected to recover.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

It happened just before 4 a.m. ET. The shooting was "not directly related to the Ferguson protests," said an FBI spokeswoman in St. Louis. An FBI official in Washington said the suspect was accused of firing at police Tuesday night.

Authorities in St. Louis County have been dealing with violent demonstrations after a grand jury decided not to indict Ferguson police officer Darren Wilson over the fatal shooting of unarmed teen Michael Brown.

IN-DEPTH

SOCIAL

Turn on #ksdk. 2 FBI agents shot this morning in Hanley Hills. Non-life threatening injuries. Info from Stl Co police pic.twitter.com/o6qpo3BHeC — Ryan Dean (@RyanDeanKSDK) November 26, 2014

— Jason Cumming and Shamar Walters