Gary Jones notched the leveller for Rochdale against 10-man Colchester.
Ian Henderson put the visitors ahead with a wonderful 25-yard free-kick before Kayode Odejayi poked home for 2-0 after Brian Wilson's cross.
Magnus Okuonghae saw red for the U's for a professional foul on Jean-Louis Akpa Akpro and Marcus Holness headed home Nicky Adams' cross for Dale.
Colchester looked set to hold out for the victory only for Jones to drive home with time running out.
VIEWS FROM THE DRESSING ROOM.
Colchester United manager John Ward told BBC Essex:
"With eleven v eleven we've been fantastic. We've scored twice, we could have got another two, we've had a great opening half an hour."
"Then obviously it gets more difficult when the sending-off crops up and we've got to deal with it."
"We've dealt with it real stoically, I think they've been very very strong today and didn't deserve the goal that went in against them."