A Texas man accused of opening fire outside the Cuban Embassy in Washington early Thursday morning was arrested and charged with assault with intent to kill, the authorities said, reporting damage to the building but no injuries.

The police and Secret Service officers were called to the scene at about 2:10 a.m., after receiving reports of gunfire by the embassy, the police said. There, officers found a man with an “assault-style rifle,” said Brianna Jordan, a spokeswoman for the Metropolitan Police Department. He was “taken into custody without incident,” she said.

She identified the man as Alexander Alazo, 42, of Aubrey, Texas, and said he had been charged with assault with intent to kill. It was not immediately clear whether he had a lawyer.

“Our initial investigation indicates that the subject was shooting toward a foreign embassy building,” Ms. Jordan said, adding that both the police and the Secret Service were investigating the incident.