Cardiff City 1-0 Bristol City
Cardiff City will take a slender advantage into the second-leg of the Division Two play-off semi-final after beating Bristol City at Ninian Park.
Thorne grabbed his sixth goal in nine matches to sink Bristol
A second-half Peter Thorne header separated the two sides, and gave Cardiff a first league win over their neighbours for 32 years.
The Robins tested home goalkeeper Neil Alexander on several occasions, and will be confident of scoring in Tuesday's return at Ashton Gate.
Robert Earnshaw could have doubled Cardiff's lead 10 minutes from time, but Steve Phillips pulled off a fine save in the visitors' goal.
The home side made a bright start and had half-hearted appeals for a penalty waved away after just seven minutes when a Rhys Weston corner caused panic in the visitors' penalty area.
But the Robins an immediate counter attack, culminating in Christian Roberts forcing a fine save from Alexander after a powerful header.
The match continued at a pulsating pace as early chances fell to either side.
There weren't that many clear-cut opportunities for either side
Bristol City manager Danny Wilson
Earnshaw, Thorne and Gareth Whalley had half chances for Cardiff, while Roberts, twice a scorer against his former club this season, forced another save from Alexander.
Time and space in the midfield were soon at a premium as both sides flooded the midfield and hoped to cut out any costly mistakes.
As the half progressed, the home side slowly began to push their opponents backwards but the organised visiting defence coped well.
Captain Graham Kavanagh warmed Phillip's hands with a header on 35 minutes after a neat build-up, but there was nothing to separate the sides at the interval.
Peacock came close to giving Bristol the lead
The second half opening mirrored that of the first half as a Cardiff penalty appeal was again turned down by referee Howard Webb.
Wales centre back Danny Gabbidon unleashed a fierce 30-yard swerving shot which Phillips only managed to palm away.
Earnshaw was first to the loose ball and hooked it back towards goal. The Cardiff players and fans screamed for a handball, but nothing was given.
The Robins' top scorer Scott Murray was kept quite in the first half, but the pacy winger had his first sight of goal on 55 minutes when he sent a header wide.
A trademark burst down the flank then drew a foul from Andy Legg. The former Wales international joined team-mate Kavanagh and Roberts in being shown a yellow card.
Bristol City then snatched the momentum away from Cardiff and a Lee Peacock header forced Alexander into action.
A goal seemed on the cards, but it Cardiff who found a breakthrough when Thorne connected at the far post.
Willie Boland delivered a perfect cross from the right wing and Thorne rose between two defenders to head powerfully past Phillips with just under 20 minutes to go.
Minutes later Earnshaw found himself clean through, but his early shot was saved by Phillips.
Danny Coles came close to snatching a precious goal for Danny Wilson's side with a header in the dying minutes, but Cardiff held on to secure a slim advantage.
Cardiff: Alexander, Weston, Gabbidon, Prior, Barker, Boland, Kavanagh, Whalley, Legg, Thorne, Earnshaw. Subs: Campbell, Margetson, Croft, Bonner, Bowen.
Bristol City: Phillips, Carey, Butler, Coles, Hill, Bell, Doherty, Burnell, Murray, Peacock, Roberts. Subs: Beadle, Tinnion, Stowell, Amankwaah, Rosenior.
Referee: H Webb (S Yorkshire).