New South Wales 233 and 2 for 76 lead New South Wales 271 (Dean 144*, Merlo 64, Tremain 4-52) by 38 runs
Travis Dean became the third Victoria batter to twice carry their bat through a Sheffield Shield innings to earn his team a narrow first-innings lead at the SCG.
James Pattinson then struck twice either side of a rain delay in the final session to leave the visitors with hope of pushing for victory on the final day if the weather allows.
Playing his first game of the season, Dean faced 300 balls as he contributed more than half Victoria's total. He had previously carried his bat against the same opposition at the MCG in the 2016-17 season.
Matthew Elliott and Bill Lawry are the only others to have done so twice or more for Victoria in the 129-year history of the Shield.
Dean was dropped at slip by Kurtis Patterson on 43 but that was his only error of the innings. He added 143 for the fourth wicket with Jonathan Merlo to turn the innings around from 3 for 2 on the first evening.
The pair were close to seeing out the opening session before Merlo was trapped lbw by Moises Henriques and then Sam Harper was caught behind for a duck off Tanveer Sangha.
At 5 for 145, New South Wales would have had hope of a lead themselves but Dean then added 111 in 27 overs with Pattinson who struck the ball cleanly. Sangha eventually broke through and the final five wickets fell for 15 with Hayden Kerr striking twice on his debut.
Pattinson removed the in-form Daniel Hughes in the first over of New South Wales' second innings when the opener drove loosely to slip. On resumption, Matthew Gilkes also edged into the cordon where Peter Handscomb took a sharp catch.