Ryan Jackson was sent off for County for a foul in the penalty box that saw him sent-off, but McLoughlin pulled of a superb save to deny Matty Lund from the spot. And the Exiles took all three-points when defender Kevin Feely sent a looping header into the net on 88-minutes.
The victory brings an end to an overall successful season for Newport County who have comfortably achieved their main aim of consolidating their status as a League Two club, and will now look to push on next campaign.
Manager Justin Edinburgh made three changes from the 1-0 defeat at York with Mike Flynn, Darcy Blake and O’Connor coming in for Lee Minshull, Andy Sandell and Christian Jolley.
The visitors started the brighter and were unfortunate not to take the lead 10-minutes in hen Donnelly’s shot tricked inches wide of the far post with the first chance of the match.
But Donnelly was to open the scoring on 28-minutes after he was fed in on the left of the penalty box by Allen. The striker was closed down by County stopper McLoughlin who blocked his initial effort, but the ball fell kindly for Donnelly ho slotted the ball into an empty net.
The home side equalised before half time however when Jackson’s cross fell to Mike Flynn on the edge of the box. The captain’s goalbound volley was flicked on by O’Connor and saved, only for the striker to knock in the rebound.
O’Connor will be relieved with his goal after missing pretty much the whole season through serious injury, but a goal on his first League Two start will stand him in good stead ahead of the 2014/15 campaign.
Rochdale, chasing the League Two title, started the second-half brightly and County hearts were in mouths when Michael Rose’s free-kick deflected off Chapman but looped just wide of the goal.
Flynn sent a left-footed effort wide before Donnelly fired a fierce volley over the bar for the visitors. But the game seemed to have turned in Rochdale’s favour when Jackson was shown a straight red-card for bringing down his man and the visitors were awarded a penalty.
Lund stepped up from 12-yards but McLoughlin pulled off a superb diving save low to his left to deny the former Stoke midfielder from the spot.
But County were to have the last laugh of a thrilling second-half when Feely looped a header into the net in the 88th minute from Robbie Willmott’s deep free-kick.
County Team: McLoughlin; Hughes, Blake, Feely, Jackson; Porter, Flynn, Chapman; Willmott, O’Connor, Zebroski
County Subs: Minshull, Jeffers, Naylor, Jolley, Holloway, Parker, Howe