Before a crowd of hundreds in the central town of Diourbel, he claimed the role of a last bastion against disorder.
The once discreet technocrat has reincarnated himself as a feisty orator and the uncontested candidate of the president's governing coalition.
"We don't want Senegal to fall into the hands of sasai," or bandits in the Wolof language, said the man President Macky Sall has picked to replace him.
All present understood the reference to anti-establishment candidate Bassirou Diomaye Faye and his charismatic political guide Ousmane Sonko.
Faye may be the deputy to Sonko, but the latter is barred from running for office so it is Faye's name which is on the ballot.
Ba and Faye are considered the favorites in Sunday's vote.
Apart from having worked in the government tax offices, they appear to have little in common and reserve each other their harshest criticisms.
Faye has focused his energy on attacking President Sall and spent several months in jail for his trouble. But on Tuesday he admitted he preferred Sall to Ba.
Sonko has branded Ba a "billionaire civil servant," questioning where his wealth came from and alleging he would be a "president for foreign countries" if elected.
Ba urged people to vote "for experience and competence instead of entrusting the reins of the country to adventurers."
Snubbed
The emergence of a new battling Ba has not gone unnoticed just days after his chances had looked seriously in doubt.
"He's found his second wind," said Sidy Diop, deputy editorial director of the daily newspaper Le Soleil.
He pointed out that Ba, who was still prime minister in September when he was hand-picked by the president to stand for the top job, had immediately faced criticism of his nomination, including from his own side.
And he will still face three dissident candidates from his own camp.
At the end of January, Karim Wade, who has been ruled ineligible for the election, accused Ba of bribing two judges at the Constitutional Council.
That saw Ba snubbed by MPs from Sall's own governing coalition who rallied to Wade's cause.
The president used the problem among his arguments for postponing the election scheduled for February, which sparked a major crisis and unrest that left four people dead.
Rumors ran wild that the head of state and his coalition had dumped Ba.
The constitutional council stepped in and forced the election to take place March 24.
Sall confirmed Ba as his successor and called the coalition to order.
Reggae man
Since then, Ba's campaign has "taken off and he himself is more confident. You can hear it in his speeches," said Diop.
When the holdouts "understood they have more to lose than gain, they all fell back into line. And it would not suit the president to let the candidate he selected lose with a terrible number of votes," said University of Saint-Louis researcher El Hadji Mamadou Mbaye.
Ahead of the ballot, 62-year-old Ba is criss-crossing the country campaigning for victory.
He opened up to the local press by admitting his "love of Bob Marley" and that he continues to listen to reggae music.
More seriously, he is pitching himself to voters as an experienced and level-headed "servant of the state" ready to bring stability back after several troubled years.
As economy minister from 2013 until 2019, Ba played a key role in implementing the Emerging Senegal Plan — a vast multi-year development program.
After a spell as foreign minister, he was appointed prime minister in September 2022 and held the post until early March.
Ba has called for "unity," "peace" and "hope" and pledged to create one million jobs in five years if elected, through investment in agriculture, industry, infrastructure and renewable energy.
"I want to be the president of employment for youngsters. We have to stop Senegal from falling into destructive hands," he said.