WASHINGTON — President Recep Tayyip Erdogan of Turkey lashed out at the United States on Thursday in brief but fiery remarks condemning criminal charges filed here against a dozen of his security personnel accused of attacking American protesters.

“What kind of a rule, what kind of a law is this?” Mr. Erdogan said, according to an account by Anadolu Agency, a state-run news service. “If those bodyguards would not protect me, why I am bringing them with me to the U.S.?”

Around the same time, Mr. Erdogan’s government summoned John R. Bass, the American ambassador, to a meeting with officials from the Foreign Ministry in Ankara. They told Mr. Bass that the charges were “wrong, biased and lack legal basis,” and blamed American law enforcement officers who had been on the scene, according to a statement provided by the Foreign Ministry.

Mr. Erdogan’s remarks and the summons came several hours after the American authorities announced that they had charged 12 Turkish security personnel and four other American and Canadian civilians in connection with the May 16 attack, which sent nine people to a hospital and was captured in vivid detail on video. They said arrest warrants had been issued for the 12 guards, who left the country with Mr. Erdogan just hours after the attack.