Updated

The suicide bomber who struck the U.S. Embassy in Ankara spent five years in prison on terrorism charges but was released after being diagnosed with a hunger strike-related brain disorder, officials said Saturday.

The bomber, identified as 40-year-old leftist militant Ecevit Sanli, killed himself and a Turkish security guard on Friday, in what U.S. officials said was a terrorist attack. Sanli was armed with TNT and also detonated a hand grenade, officials said.

The U.S. flag at the embassy flew at half-staff and already tight security was increased. Police sealed off a street in front of the security checkpoint where the explosion knocked a door off its hinges and littered the road with debris. Police vehicles were parked in streets surrounding the building.

Sanli's motives were still unclear. He had been a member of the outlawed Revolutionary People's Liberation Party-Front, or DHKP-C, which has claimed responsibility for assassinations and bombings since the 1970s but has been relatively quiet in recent years. Compared to al Qaida, it has not been seen as a strong terrorist threat.

Officials said Sanil was arrested in 1997 for alleged involvement in attacks on the police headquarters and a military guesthouse in Istanbul and jailed on charges of membership in the group. While in prison awaiting trial, he took part in a major hunger strike that led to the deaths of dozens of inmates, according to a statement from the Ankara governor's office. The protesters opposed a maximum-security system in which prisoners were held in small cells instead of large wards.

Sanli was released in 2002 after being diagnosed with Wernicke-Korsakoff syndrome, a malnutrition-related brain illness that affects vision, muscle coordination and memory and that can cause hallucinations. Sanli fled Turkey after his release and was wanted by Turkish authorities, the statement said. He was convicted in absentia in 2002.

The Ankara governor's office, citing the findings of a bomb squad that inspected the site, said Sanli had used 6 kilograms of TNT for the suicide attack and also detonated a hand grenade. Officials had earlier said that the bomber detonated a suicide vest at the checkpoint on the outer perimeter of the compound.

The guard who was killed was standing outside the checkpoint. A Turkish TV journalist was seriously wounded and two other guards had lighter wounds

The attack drew quick condemnation from Turkey, the U.S., Britain and other nations, and officials from both Turkey and the U.S. pledged to work together to fight terrorism.

It was the second deadly assault on a U.S. diplomatic post in five months. On Sept. 11, 2012, terrorists attacked a U.S. mission in Benghazi, Libya, killing U.S. Ambassador Chris Stevens and three other Americans. The attackers in Libya were suspected to have ties to Islamist extremists, and one is in custody in Egypt.

U.S. diplomatic facilities in Turkey have been targeted previously by terrorists. In 2008, an attack blamed on al-Qaida-affiliated militants outside the U.S. Consulate in Istanbul left three assailants and three policemen dead.