Preston North End slipped to their first defeat of pre-season, beaten by Lancashire rivals Burnley at Deepdale.
In a game which ebbed and flowed, there was plenty of attacking flair on show but the need for more defensive organisation was highlighted.
Josh Harrop shot North End into the lead after 22 minutes after Sean Maguire and Graham Burke had linked-up well.
The lead lasted just four minutes as Aaron Lennon finished well for the Clarets equaliser.
Burnley changed all their outfield players early in the second half and it was substitute Dan Agyei who headed them in front in the 72nd minute.
Within two minutes PNE were level, Callum Robinson running on to a Maguire through ball to score.
But the Premier League visitors claimed victory in the 84th minute, Dwight McNeil firing home from the edge of the box.
Alex Neil had flipped his squad over from the weekend's friendly with West Ham, starting with 10 players who had been on the bench against West Ham.
The exception was Ben Pearson who had departed with a rib injury early in the Hammers game.
North End started in a 4-2-3-1 formation, Harrop in the No.10 role behind Maguire, with Burke on the right and Robinson on the left.
Burke had the first sight of goal, his left foot shot from the right corner of the box gathered comfortably by Tom Heaton.
At the other end, James Tarkowski sent a header over the bar from Johann Berg Gudmundsson's corner, while Jeff Hendrick fired a shot into the side-netting.
In between those two chances was a yellow card for Calum Woods, the PNE right-back shown a yellow card for a late challenge on Gudmundsson.
With 20 minutes on the clock, Ashley Westwood robbed Woods of possession and squared a pass to Sam Vokes in the middle, his shot blocked superbly by skipper Paul Huntington.
The rebound fell to Lennon, his shot parried by Declan Rudd with the ball then cleared out of the box.
North End went in front in the 22nd minute, Burke starting the move down the right channel.
Burke cut inside on to his left foot before rolling a pass across the face of the box to find Maguire who took a touch and threaded a pass through to Harrop in the box.
Harrop took a touch before hitting a low shot across the keeper into the bottom corner.
The lead lasted four minutes, Lennon driving an emphatic first-time shot past Rudd after Huntington had blocked a Hendrick shot.
In the run-up to the interval, Robinson sent a shot inches too high from 20 yards after showing some nice footwork, while Burke fired wide.
In the 44th minute, Hendrick's chip just cleared the Preston bar and landed on top of the net.
North End had the ball in the net 90 seconds after half-time but an assistant's flag denied them a goal.
Robinson advanced through the Burnley half before hitting a fierce shot which sub keeper Adam Legzdins parried into the path of Maguire who knocked the ball into the net.
But the assistant ruled that Maguire was in an offside position when Robinson had shot and up went the flag.
After 54 minutes, Burnley replaced all 10 outfield players with an eye on their Europa League qualifier at Aberdeen on Thursday night.
With an hour gone, Maguire linked well with Daniel Johnson in the box, cutting on to his right foot and hitting a low shot which Legzdins got down to hold at the near post.
Johnson tried his luck soon after, collecting Harrop's pass and curling a shot over the top.
The Clarets went in front in the 72nd minute, Jon Walters' cross finding the unmarked Agyei in the box who headed past Rudd.
But PNE were behind for only two minutes, Billy Bodin's pass finding Maguire who threaded the ball through the visitors' defence to release Robinson.
The Preston No.7 showed calmness in slotting a low shot past the keeper and into the net off the inside of the post.
Burnley's winner came with six minutes left, McNeil rifling home a shot from the edge of the box after Huntington had headed clear a cross.
PNE: Rudd, Woods (Fisher 70), Huntington, Storey, Hughes, Pearson (Ledson 59) Johnson (Moult 70), Robinson, Harrop (Browne 70), Burke (Bodin 62), Maguire (Horgan 79). Subs (not used): Maxwell, Earl, Clarke, Davies, Gallagher.
Burnley: Heaton (Legzdins 46), Lowton (Taylor 54), Tarkowski (Kioke 54), Mee (Long 54), Ward (Bardsley 54), Gudmundsson (Goodridge 54), Cork (Dunne 54), Hendrick (McNeil 54), Westwood (Agyei 54), Lennon (Wells 54), Vokes (Walters 54).
Referee: Peter Bankes (Merseyside)