Queensland 281 for 8 (Peirson 115*, Bryant 40, Abbott 3-63, Kerr 2-48) trail New South Wales 320 (Gilkes 94, Bartlett 4-50, Sinfield 3-70) by 39 runs
Jimmy Peirson, the captain, turned around a poor run of form with a defiant unbeaten century to keep Queensland in touch with New South Wales in their Sheffield Shield match at the Gabba.
Queensland ended the second day on 281 for 8, just 39 runs shy of New South Wales' 320.
Thanks to Peirson's 115 not out, Queensland recovered from a precarious 102 for 6 to prevent New South Wales collecting a potentially match-winning lead in the first innings.
Peirson, who had failed to reach double-figures in his past six innings across all forms of the game, struck 13 boundaries in reaching his sixth first-class century.
He found a valuable ally in Xavier Bartlett (32), as the pair adding 91 for the eighth wicket. Mark Steketee added further lower-order resistance to end the day on 27 not out.
Sean Abbott did the early damage for New South Wales with two wickets in the first session as Queensland limped to 51 for 4 at the conclusion of a rain-impacted opening session.
Max Bryant (40) offered the strongest resistance from Queensland's top order with a quick 40, but his dismissal - bowled shouldering arms - was emblematic of Queensland's early fortunes.
Abbott knocked over Jack Wildermuth after the break for seven and ended the day with 3 for 63.
Earlier, New South Wales, who were nine wickets down overnight, added nine runs to their overnight tally to post 320 in their first innings. New South Wales, who haven't won a game yet, need a victory at the Gabba to avoid a record winless streak, while Queensland started the match in a four-way share of second.