Gary Johnson was given the perfect start to his managerial reign at Bristol City after seeing them win 3-2 against high-flying Brentford.
Goals from Marcus Stewart, Luke Wilkshire and Steve Brooker earned City their first win in six matches.
Stewart opened the scoring somewhat against the run of play when he grabbed his second goal of the season on 12 minutes.
The former Ipswich striker poked the ball in from close range after debutant Guy Madjo had headed down Craig Woodman's looping cross.
Until then Brentford had the better chances. In the third minute Marcus Gayle should have found the target but his header from Sam Tillen's cross sailed harmlessly over the crossbar.
Brentford could count themselves unlucky to have two penalty appeals turned down by referee Kevin Wright.
Isaiah Rankin was held in the box by Matt Heywood before Gayle was also hindered by the City captain.
Wilkshire then doubled Bristol's lead five minutes before half time with a spectacular free-kick.
The Australian international curled in a fine shot from 25 yards that rippled the top left corner.
After the restart Brentford pulled themselves back into the game when substitute Paul Brooker made it 2-1 from the edge of the box.
Hopes of a comeback were dealt a massive blow when Steve Brooker then restored City's two-goal advantage.
The ex-Watford striker capitalised on some poor Brentford marking to head home Scott Brown's cross at the near post.
City were handed a golden opportunity to add to their lead when Stuart Nelson brought down Brown in the box leaving referee Wright little option but to point at the spot.
The goalkeeper made amends for his error though and guessed right to keep out Wilkshire's spot-kick.
Brentford ensured the drama went right to the final whistle though when the impressive Sam Sodje stooped to make it 3-2.
The centre-back rose highest in the box to power a header past Steve Phillips but City clung on to take all three points.