The man who blew himself up outside America's embassy in Ankara yesterday, killing himself and a Turkish security guard, spent five years in prison on terrorism charges, officials revealed today.

Ecevit Sanli, 40, was released on probation after being diagnosed with a brain disorder incurred during a hunger strike.

He used TNT and detonated a hand grenade in the attack, it was confirmed.

Sanli was a member of the outlawed leftist 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.

The motives for yesterday's attack remain unclear, but today a statement from the group was posted online, claiming responsibility for the attack.

It read: "Our warrior Alisan Sanli carried out an act of self-sacrifice on Feb 1, 2013, by entering the Ankara embassy of the United States, murderer of the people of the world."

Officials said Sanli was arrested in 1997 for alleged involvement in attacks on police headquarters and a military guesthouse in Istanbul and jailed, facing charges for his DHKP-C membership.

According to the Ankara governor's office he took part in a major hunger strike while in prison, opposing a maximum-security system in which prisoners were held in small cells instead of large wards.

The strike killed dozens of inmates.

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. Once released, he fled Turkey and was wanted by Turkish authorities, the statement said. He returned to the country using a fake ID, though it is not known when.

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.

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

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

It was the second deadly assault on a US diplomatic post in five months. On September 11, 2012, terrorists attacked a US mission in Benghazi, Libya, killing US 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.

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

The U.S. flag was flying at half-mast today at the embassy, where security has been increased.