The last time Turkish President Recep Tayyip Erdogan visited Washington, members of his security detail overran police and were caught on video beating demonstrators at Sheridan Circle, violent clashes that drew condemnation and criminal charges against more than a dozen of the leader’s guards.

But newly revealed State Department memos show the two-day visit in 2017 was filled with other troubling antics and discord. D.C. police and federal officers who were supposed to be helping protect a visiting head of state were instead entangled with his security forces from the moment the delegation’s two planes touched down at Joint Base Andrews.

At one point, U.S. authorities intervened in a squabble among the Turkish guards. In another case, they seized a guard’s weapon and handcuffed him. They later admonished a security officer who accosted a passerby filming the entourage on a downtown street and barred a guard from traveling in a State Department car. In the course of the visit, several U.S. officers and federal agents were hurt, and at least one was punched.

Erdogan is scheduled to return to Washington on Wednesday, and D.C. police and the State Department are preparing for the possibility of new demonstrations amid a climate even more volatile than in 2017, following the withdrawal last month of American troops from northeastern Syria and Turkey's invasion targeting Syrian Kurds.

D.C. police Chief Peter Newsham would not offer details of security plans but said his department “will take every measure possible to make sure we don’t have another conflict like we had the last time.” He said his staff has been in contact with the State Department.

Officials with several federal agencies — including the Secret Service, the State Department and the White House — did not comment or did not respond to questions about Erdogan’s planned trip.

Erdogan had considered putting off the visit after the U.S. House of Representatives on Oct. 29 recognized as genocide the century-old mass killing of Armenians by Ottoman Turks, according to several media outlets. But President Trump tweeted on Wednesday: “Look forward to seeing President Erdogan next Wednesday, November 13th at the @WhiteHouse!”

Lusik Usoyan, one of the demonstrators who was injured two years ago, said she finds it incomprehensible that Erdogan would be invited back to the White House. “It’s just not how it should be,” the 36-year-old paralegal said.

Usoyan, a Yezidi Kurd born in Armenia who now lives in the United States, said she was repeatedly kicked in the head after being thrown to the ground and suffered memory loss and is unable to work.

“In this country, I had always felt safe,” said Usoyan, who fears some of the same security officers will return Wednesday. “I never imagined something like this would happen to me. I kept thinking, ‘I’m on the ground, why to they continue to beat me?’ I am no threat to them other than what I think.”

Usoyan, who is among several demonstrators suing the Republic of Turkey over the attack, said she will protest Erdogan’s return visit, joining others “raising our voices as the First Amendment allows.

“We will not be watching quietly,” she said.

After the 2017 visit, two Erdogan supporters were each convicted of assault and sentenced to 366 days behind bars. The Turkish guards left the country before criminal charges were filed. Prosecutors eventually dropped cases against all but four of them, who remain indicted on felony counts of assault and are being sought on arrest warrants by the U.S. Marshals Service. It could not be determined if those officers are still on the Turkish president’s security detail or if they will attempt to enter the U.S. for his upcoming trip.

The visit in 2017 by Erdogan and his foreign minister got off to a difficult start as soon as the Turkish delegation arrived in Maryland on May 15.

The State Department memos were obtained through the Freedom of Information Act by a law firm involved in civil lawsuits against Turkey and are included in public court filings. They say the dignitary protective division broke up a shouting match between the security detail’s leader and his staff on the tarmac. An agent told his Turkish counterpart that it was “unacceptable behavior.”

The next day, a State Department security official scolded a Turkish guard who grabbed a man and ordering him to stop recording Turkish officials as they walked from the St. Regis Hotel to a coffee house near the White House. The State Department memo says the diplomatic official told the Turkish guard that recording law enforcement in public is legal.

Video of the following day’s altercations at Sheridan Circle captured Turkish security guards outside the ambassador’s residence ignoring police commands and breaking through their lines. It shows them ripping posters, tackling and kicking people in the crowd, and fighting with police who struggled to maintain order. A 61-year-old man suffered a concussion and lost a tooth when he was kicked and beaten in the head, according to an account in the civil suit. A woman was attacked while pushing her child in a stroller.

The State Department memos describe other, previously undisclosed details of the those clashes at the circle and along a stretch of Massachusetts Avenue that leads to the Turkish Embassy.

State Department officials watched helplessly as a Turkish security officer jumped from a vehicle in a motorcade “to join the fighting.” D.C. police and members of the Secret Service also physically restrained the leader of the Turkish security force and other guards to keep them from leaving the embassy to join the melee. A Turkish security officer punched a D.C. officer in the nose, “causing massive blood flow.”

Authorities detained two Turkish officers, putting at least one in handcuffs and seizing his weapon as authorities debated whether to make arrests and discussed the legal complexities of diplomatic immunity. The security officers were later freed and the gun returned as the men boarded the airplane home later that night. One memo says the Turkish ambassador had pleaded for the officers’ release from custody “by ‘looking past’ what had happened.”

Officials at the Turkish Embassy did not respond to calls and an email seeking comment.

Soon after, D.C. Mayor Muriel E. Bowser (D) said the Turkish guards attacked “peaceful protesters,” calling the melee an “affront to our values.” The U.S. House of Representatives voted to condemn the attacks, and three dozen lawmakers demanded the Turkish officers be “arrested, prosecuted and jailed.”

Indictments filed against the guards describe the clashes as coordinated by Turkish officers in suits and olive-green military-style jackets who wore earpieces and appeared to communicate with each other. The indictment says “members of the conspiracy … rushed the anti-Erdogan protesters in a nearly simultaneous, coordinated throng,” as “Mehter March,” a Turkish nationalist song, played over loudspeakers.

The indictment quotes a Turkish officer telling a D.C. police officer that Erdogan was approaching and the demonstrators, some waving red, yellow and green Kurdistan flags, needed to be dispersed, “You need to take them; if you don’t, I will.”

Turkish leaders blamed the demonstrators, whom they linked to the separatist Kurdish Workers Party, or PKK, which both Turkey and the United States have designated a terrorist organization. They complained U.S. authorities allowed the group to get too close to Erdogan, who watched some of the fighting.

“The American police are not doing anything,” Erdogan told Turkey’s semiofficial Anadolu news agency at the time. Demonstrators denied being members of the PKK.

David Saltzman, one of the attorneys representing the Republic of Turkey in the two civil lawsuits, said his client hopes improved security awaits Erdogan’s visit on Wednesday, “so that agitated individuals sympathetic to a foreign terrorist organization cannot get dangerously close to a visiting head of state.”

In federal court pleadings, Turkey’s defense team wrote that police “failed to address a legitimate, perceived threat posed by the Anti-Turkey Group” and Erdogan’s security officers “had no choice but to react.”

The 2017 trip ended hours after the disturbance at Sheridan Circle. Back at Joint Base Andrews, the head of the State Department’s protective detail wrote in a report that the Turkish foreign minister “shook my hand and thanked me for our support,” but not before commenting on the chaos: “This was not good.”

The diplomatic officer wrote the foreign minister told him State Department security officers “were the main cause of the incident.”

The U.S. official responded that “this was indeed a regrettable incident, however, not one that [diplomatic officers] bear responsibility for.”

Carol Morello contributed to this report.