Four days after his release from jail on bail, former Portuguese Prime Minister Jose Socrates has endorsed Socialist Party candidate Antonio Costa to lead the country following an Oct. 4 general election.

Socrates gave his backing to Costa in a statement published Tuesday in the Jornal de Noticias newspaper.

Socrates was Portugal's center-left Socialist premier from 2005 to 2011.

A Portuguese judge last Friday released him to house detention from jail, where he spent over nine months on suspicion of corruption, money-laundering and tax fraud.

Socrates earlier refused a deal to allow him house detention with an ankle bracelet monitoring device. He was released without a requirement to wear one.

Costa is campaigning against the incumbent center-right government led by Prime Minister Pedro Passos Coelho.