Two-goal hero Grant Holt fired a last-gasp winner to send Rochdale into the second round of the FA Cup at the expense of Oxford. United took the lead after 20 minutes when Lee Bradbury beat keeper Matt Gilks from close range.
Rochdale equalised when Holt headed home from Alan Goodall's cross, and he went close again after the break.
But Dale had to wait until the last minute when Holt blasted the winner during panic created by a corner.
Rochdale: Gilks, Evans, Griffiths, Gallimore, Goodall, Cooksey, Clarke, Jones, Holt, Atieno (McGivern 83), Tait (Bertos 70). Subs Not Used: Edwards, Warner, Probets.
Goals: Holt 36, 90.
Oxford Utd: Tardif, Mackay, Togwell, Woozley, Robinson, E'Beyer (Hackett 53), Quinn, Wanless, Basham, Mooney (Brooks 84), Bradbury. Subs Not Used: Roget, Clarke, Molyneaux.
Booked: Mackay.
Goals: Bradbury 20.
Att: 2,333
Ref: E Ilderton (Tyne & Wear).