Athens: Bomb blasts at a prison and a court rocked two Greek cities and police on Friday blamed far-left militants for the attacks.

One exploded overnight outside an Athens high security prison. The blast, heard across the capital, injured one woman. The second bomb on Friday went off in a bathroom in the main court building in Thessaloniki.

The Athens bomb contained about 12 kilogrammes (26 pounds) of explosive and was detonated by a timer mechanism, police said. The woman was hit by glass splinters.

The attacks came as the Greek government confronts widespread opposition to its austerity programme. But no immediate connection was made to the often violent protests of recent weeks.

Police said the Athens blast was linked to the far left as two out of six detained members of the Revolutionary Struggle and November 17 groups are held in the prison targeted.

"There is a clear symbolism," said a senior police source.

"We believe the attack was carried out either by those members of Revolutionary Struggle who are still at large or by other active groups like the Conspiracy of Fire Nuclei or the Revolutionary Sect," the source said.

"Our theory is that these groups are interlinked, with exchanges at the level of members, material and information," the source added.

"It's clearly a terrorist attack," the source continued.

The bomb, hidden in a bag that was left in a bin, detonated late Thursday following anonymous tip-offs to a Greek newspaper and television station some 20 minutes before the explosion. The same newspaper and television station were warned about the Thessaloniki bomb.

Police said there could have been more victims in Athens if police had not evacuated the area in time and shut off the street.

"Bomb Message," read a headline in the Ta Nea daily.

Ta Nea pointed out that this was the first militant attack in Greece since the arrest in April of six alleged members of Revolutionary Struggle, whose attacks include a rocket strike against the US embassy in Athens in 2007.

Bomb attacks by far-left groups are relatively common in Greece and are usually designed to avoid causing injury.

But in March, a young Afghan boy was killed and his mother and sister were hurt when a bomb exploded outside an institute for training public officials.

Korydallos prison near Athens is currently holding the convicted members of Greece's most notorious far-left group, November 17, which killed 23 people between 1975 and 2000 before its breakup in 2002.

Conspiracy of Fire Nuclei is a far-left group that specialises in arson attacks against the offices and homes of politicians.

Other militant groups in Greece include the Revolutionary Sect, which murdered an anti-terrorist officer in June and has been blamed for drive-by shootings on a police station and a television group. The group surfaced after police fatally shot a 15-year-old boy in December 2008.