A goal in each half from the in-form Charlie Austin earned Burnley a first away league win of the season at Derby.
The visitors fell behind when Jamie Ward pounced on a loose ball from a badly-defended corner to give The Rams a 20th-minute lead.
But Chris McCann set Austin free and the unmarked striker swivelled to shoot home through a myriad of legs.
And Austin scored his ninth goal of the season in dramatic style, with an unstoppable header in the 89th minute.
Burnley's victory ensures they move up to 15th in the table, exchanging places with a Derby team who suffered their first league defeat of the season at Pride Park.
The result could have been different had Conor Sammon been as prolific inside the box as Austin.
A superb save from Clarets goalkeeper Lee Grant thwarted Will Hughes in the 10th minute, but the hosts were soon in the lead when Paul Coutts's corner was only half-cleared and Ward struck for the opener.
Frank Fielding denied Martin Paterson on the counter-attack, but there was little the goalkeeper could do to prevent former Swindon striker Austin from levelling.
After the break, Sammon went close from directing a Ward cross into the net and the former Wigan striker had another great opportunity, only to tamely shoot towards the goalkeeper with 15 minutes remaining.
Sammon again narrowly headed over the crossbar in the 80th minute and the forward was to rue his profligacy as Austin struck late to secure Burnley's first points on the road.
Sorry, we were unable to load match stats, please try again.