D.C. Mayor Muriel E. Bowser (D) at a July news conference in which she called for the public’s continued assistance in removing illegal guns from the streets. (Toni L. Sandys/The Washington Post)

D.C. police seized a semiautomatic handgun and a rifle from a man earlier this month, using for the first time a new law that allows authorities to temporarily seize firearms from people believed to be dangerous.

D.C. Superior Court filings under the “red flag” law say the 44-year-old man from Northwest Washington tried to register a .45-caliber semiautomatic handgun at police headquarters Sept. 6.

The documents say officers felt the man appeared to be acting “odd and somewhat out of the ordinary.”

According to the court documents, the man had a pending assault case in Montgomery County and had been investigated in January after police found a gun in the trunk of his vehicle at George Washington University.

Police said prosecutors declined to charge the man in that case and also did not pursue a sexual assault case in the District in 2018. Authorities also noted a years-old suicide attempt and anguish over a divorce case.

The D.C. police officer who requested the petition wrote the man “may be experiencing a mental health crisis or other dangerous mental health issues.”

A Superior Court judge granted the request to temporarily seize the .45-caliber handgun the man had taken to the police building, as well as a semiautomatic .308-caliber rifle he had in his home. A court hearing on the matter is scheduled for Monday.

The District enacted the “red flag” law, which allows an emergency protective order to be sought, in January. It is similar to ones in at least 17 other states designed to help police and everyday citizens flag people with guns who may be unfit. Maryland has fielded more than 780 petitions and granted more than 400.