Middlesbrough 1 Preston 2: Late heartbreak leaves Chris Wilder winless
But after a string of good saves from Preston’s Daniel Iversen, McAvoy celebrated three points after two late goals.
Ched Evans, who played under Wilder at Sheffield United, headed Preston level 13 minutes from time before Emil Riis was gifted the winner soon after to prevent a third straight defeat.
Wilder had watched his new side record a point against Millwall four days earlier, but it is now five without a win for the Teessiders who were leapfrogged by Preston into 14th.
With goalscoring chances initially scarce, Middlesbrough were fortunate not to have conceded a penalty when Marcus Tavernier shoved Riis as he charged into the area.
That proved a crucial decision as shortly after Tavernier whipped a beautiful ball across the face of goal that Duncan Watmore was inches away from getting on the end of, Middlesbrough went ahead.
Jonny Howson took over corner-taking duties from centre-back McNair and that move proved pivotal because the latter’s thunderous header from the delivery crashed in off the underside of the bar.
“ith seconds remaining of the first half Preston goalkeeper Iversen made a stunning save to prevent Watmore from making it two with a chip from 20 yards.
Overlapping centre-back Lee Peltier was next to go close early in the second half when he turned on to his right foot and curled an effort against the woodwork. Iversen was then called into action to palm away a low drive from Andraz Sporar and those saves paved the way for the surprise turnaround.
Ben Whiteman sent over the corner in the 77th minute and Evans rose in a crowded area to head inside Luke Daniels’ top left corner for his first of the season.
Sol Bamba’s lazy pass in his own box deflected off McNair and dropped to Riis. The Dane controlled before curling beyond Daniels with nine minutes left to frustrate the Riverside crowd.