Jeda was the difference as Luigi De Canio's Lecce completed their great escape from relegation, with a win over their already-doomed arch-rivals confirming Serie A survival for another season.
The Brazilian's opened the scoring in the 52nd minute and then saw his 80th-minute shot - which was going off target - turned into his net by Bari's Andrea Masiello.
The result means the Giallorossi are safe with a week of the season remaining, as rivals Sampdoria, who started the game two points behind the Giallorossi in the final relegation place, lost 2-1 at home to Palermo.
The win capped a superb revival from De Canio's men, who had snapped a run of three games without a win with a surprise 2-1 win over Napoli last weekend which dragged them out of the bottom three.
And it sealed a miserable home campaign for rock-bottom Bari, with the San Nicola saying goodbye to top-flight football after a season which has seen the hosts take just 21 points with one game to go.
Lecce looked like they meant business from the start with Jeda bringing a fine save out of home goalkeeper Jean Francois Gillet on 22 minutes, before Alessandro Parisi missed Bari's first chance with a long-range drive.
Gillet saved from Djamel Mesbah just before the break, then David di Michele came close to breaking the deadlock for the visitors in first half injury time when he fired inches over the bar.
Jeda settled Lecce's nerves by heading the opener direct from Mesbah's corner, but di Canio's men still looked vulnerable and Bari substitute Francesco Grandolfo shot just wide on 77 minutes.
Play was halted for a few minutes when fans were throwing flares near Rosati's goalmouth - but after a short delay play resumed.
And Lecce sealed victory 10 minutes from time when Jeda's shot was deflected past his own goalkeeper by Masiello.
Massimo Donati shot just wide for Bari in injury-time - but survival, and revenge for a 1-0 defeat in January's match between the teams at the Stadio Via del Mare - was Lecce's.