Supporters of former Brazilian President Luiz Inacio Lula da Silva hold a flag next to Federal police headquarters in Curitiba, Brazil, July 8, 2018. The flag reads: "Free Lula". REUTERS/Geraldo Bubniak

SAO PAULO (Reuters) - Brazilian former President Luiz Inácio Lula da Silva should remain in prison, Carlos Eduardo Thompson Flores, chief justice of Brazil’s TRF-4 appeals court, ruled on Sunday, in an effort to settle a legal dispute over his possible release.

Flores granted a prosecutor’s request seeking to end the legal uncertainty created by a judge’s injunction earlier in the day freeing Lula so he can campaign ahead of an October presidential election.