This could potentially prove to be a damaging day for Middlesbrough’s automatic promotion bid.
Not only could they now slip out of the top two if Millwall win their game in hand, but influential skipper Hackney had to be substituted after pulling up shortly after setting up Castledine’s goal.
Hellberg’s men have now taken just three points from home games against Oxford United, Leicester, Charlton and Bristol City, as anxiety around their attempt to end their nine-year top-flight absence increases.
They had the better of things in a low-key first half, but Tommy Conway’s early header from close range that went well over was the best they could muster.
Manchester United loanee Vitek made a wonderful reaction save to deny Alan Browne a seemingly certain goal when the Republic of Ireland international looked to follow in Aidan Morris’ initial effort.
Castledine eventually did put the home side in front with his first goal for the club since joining from Chelsea, after Boro opened up the visitors with some incisive passes through the lines.
Strelec should have made it 2-0 when a slip left him clean in on goal, but he dallied before sending a weak shot at Vitek.
With just over 60 seconds of time added on left to play Randell, back from a one-game ban, thundered in a header from Tomi Horvat’s wicked corner, with the home defence preoccupied by Vitek having come forward for the last-ditch set piece.
Boro, who boast the league’s best away record, will look to bounce back at Blackburn next Saturday, while City host fellow strugglers West Brom later that afternoon.