Jayawardene, who became the eighth batsman to complete 11,000 one-day runs when he reached 62, anchored the middle-order with an unbeaten 84 off 81 balls.
Thirimanne made 57 in the day-night match at the Oval, which Sri Lanka must win to join hosts England in the semi-finals from group A.
Australia need to win in 29.1 overs to make the last four on the basis of a superior run-rate than New Zealand’s.
A loss for either side will knock them out of the eight-nation tournament.
India and South Africa are the semi-finalists from group B.
Sri Lanka make a disastrous start, losing two quick wickets by the fourth over after Australia won the toss in overcast conditions and elected to field.
Left-hander Kusal Perera perished off the third ball of the match, leg-before to left-arm fast bowler Mitchell Johnson, who finished with three wickets for 48 runs.
Kumar Sangakkara, who hit a match-winning 134 not out against England at the same venue last week, made three when he cut Clint McKay to Glenn Maxwell at point to make it 20-2.
Tillakaratne Dilshan (34) helped Thirimanne resurrect the innings with a 72-run stand for the third wicket before the opener was snapped up smartly in the slips by Shane Watson off spinner Xavier Doherty.
Thirimanne hit four boundaries in his half-century when he became Johnson’s second victim, caught at mid-wicket by the alert Watson.
Skipper Angelo Mathews was bowled by James Faulkner for 12 to reduce Sri Lanka to 159-5 in the 37th over before Dinesh Chandimal (31) put on 65 for the sixth wicket with Jayawardene.