South Australia 154 (Swepson 5-55) and 4 for 138 need 310 more runs to beat Queensland 5 for 496 dec and 3 for 105 dec (Khawaja 46*)
An early declaration and two breakthroughs from Queensland seamer Michael Neser left South Australia needing a miracle to chase 310 runs with just six wickets in hand on the final day.
Callum Ferguson, in his final Sheffield Shield innings, and Harry Nielsen guided the Redbacks to stumps with an unbeaten partnership of 70 from 180 balls after Neser took the crucial wicket of captain Travis Head earlier in the afternoon.
Head had made scores of 171 not out and 151 in the third innings of each of the last two matches to twice rescue South Australia from certain heavy defeats. But Neser removed him for a second-ball duck with a superb delivery that just nipped away and scratched Head's outside edge.
Two balls earlier Neser had shifted the obdurate Will Bosisto, who had lasted 77 balls for just 11 before edging behind, with Jimmy Peirson taking a sensational one-handed catch to his right at full stretch. Henry Hunt holed out to fine leg three overs later to leave the Redbacks 4 for 68 and in danger of not taking the game into the final day.
Ferguson received a guard of honour from the Queensland side as he walked out to bat for the final time in Shield cricket after announcing his retirement pre-game. He and Nielsen stood tall as the Bulls crowded the bat and Mitchell Swepson wheeled away into the footmarks for 19 overs without reward.
Earlier, Queensland opted not to enforce the follow-on despite a first-innings lead of 342 when Lloyd Pope fell in the third over of the morning.
That gave incumbent Australia Test opener Joe Burns a chance to get some valuable runs and time in the middle but he was out for just 11 to take his season tally to just 57 runs from five innings.
Marnus Labuschagne made a rare double failure in the match but Usman Khawaja picked up from where he left off in the first innings scoring an unbeaten run-a-ball 46 to set up a lunchtime declaration and give Queensland five sessions to defend 448.