US President Donald Trump said on Sunday that the man who opened fire outside the White House had a “violent history and possible obsession” with the building.“Thank you to our great Secret Service and Law Enforcement for the swift and professional action taken this evening against a gunman near the White House, who had a violent history and possible obsession with our Country's most cherished structure,” he said in a post on Truth Social.The shooting took place on Saturday evening at a security checkpoint near 17th Street and Pennsylvania Avenue, close to the White House complex.According to the US Secret Service, the suspect approached the checkpoint carrying a bag, pulled out a gun and began firing at officers stationed there. Security personnel returned fire and struck the attacker.Also Read: Shots fired near White House during Trump's Iran talks; suspect dead, bystander injuredThe man was taken to hospital, where he later died, the agency said.A bystander was also hit during the exchange of gunfire. Officials said it was not yet clear whether the injury came from the gunman or from officers returning fire.Law enforcement sources told Reuters that the suspect had earlier been identified as an emotionally disturbed person and had been served with a “stay-away order”.The Secret Service said no personnel were injured and confirmed that Trump was inside the White House during the incident.The shooting comes weeks after another security scare in Washington, when shots were fired near a hotel hosting the White House Correspondents’ Association dinner, prompting evacuations of senior officials including the president.