The visitors, resuming at 279 for six in reply to hosts' first innings total of 246, batted for 50 minutes to add 46 runs in 10 overs to take a 79 run lead.
A poor start by hosts in the second essay enabled the UP bowlers to get on top and were reduced to 3 for 35 but soon recovered with some solid defence by the middle order.
Anirudh Singh(43) and recalled batsman Vinay Kumar(75) played with caution and took the team to safety by adding 61 runs for the fourth wicket.
Vinay Kumar added 54 runs for the fifth wicket with Arjun Yadav(24) while Ibrahim Khaleel eked out a useful 37 to lift the score to 221.
UP spinner S Srivastawa troubled the batsmen with his flight and claimed five wickets for 55 runs off 16 overs.
Anirudh hit a quick 43 off 83 ball with five hits to the fence while Vinay compiled a patient innings of 73 runs off 165 balls with 8 hits to the fence.
Speedster RP Singh swung back into action to account for Arjun Yadav and Ibrahim Khaleel who was well taken by Jyoti Yadav for a breezy 37 off 57 deliveries.
Uttar Pradesh, with four points of the three matches it played so far, needs 143 runs to win the match on the final day tomorrow in 90 overs.