Substitute Kyle Bennett's deflected shot in stoppage time sealed a dramatic 2-1 win for Doncaster at Shrewsbury to send them to the top of League One.
It was a first win in six games for Brian Flynn's side but they left it late to end their lean run.
Doncaster made much of the early running but were twice cursing their luck when the woodwork came to Shrewsbury's rescue.
James Husband smashed a swerving 25-yard drive against the bar in the fifth minute and then Rob Jones struck the post from close range.
Shrewsbury's task was made harder when midfielder Dave McAllister was sent off in the 36th minute.
He received a straight red card for what referee Ollie Langford interpreted as a reckless challenge.
Doncaster had to be patient to make their extra man count with Chris Weale pulling off some fine saves before Husband, set up by James Coppinger, stroked the visitors into a 73rd-minute lead.
Shrewsbury's 10 men showed plenty of spirit and looked to have snatched a point when a last-minute shot on the turn from Tom Eaves, on loan from Bolton, squirmed past red-faced goalkeeper Gary Woods.
But there was still just enough time for Bennett, a Shropshire lad, to win it for Doncaster in the closing stages when his shot was deflected past Weale to leave Shrewsbury crestfallen.