Bristol City secured a sixth successive season in the Championship with a convincing victory over Barnsley at a packed Ashton Gate.
An early strike by Cole Skuse gave Derek McInnes's side the perfect start.
Jon Stead made sure of victory by converting a controversial penalty early in the second half as City extended their unbeaten run to seven league matches.
The result condemned Portsmouth and Coventry City to relegation.
A near sell-out crowd visited Ashton Gate, both in hope and expectation, and they were not to be disappointed.
Barnsley's Nathan Doyle sent an early warning shot fizzing over Dean Gerken's crossbar, while Stephen Dawson also went close.
But, although the visitors' play was muscular and committed, it was devoid of the finesse required to create anything more clear-cut. City were altogether more clinical.
The opening goal came from City's first shot on target as a short, sharp exchange of passes between Stead and Chris Wood released Skuse into the penalty area. The City midfielder took his chance delightfully, forcing a low shot beyond Barnsley goalkeeper Button and into the far corner of the net.
Albert Adomah was a constant thorn in Barnsley's side, creating one chance for Stead and another for Skuse with his searing turn of pace down the right flank.
It was from one such surge that City were denied a penalty as half-time approached, with referee Darren Deadman waving away appeals when the ball struck Scott Wiseman's arm.
Minutes into the second half, the referee did point to the penalty spot, adjudging Barnsley captain Jimmy McNulty to have pulled back Ryan McGivern as he attempted to connect with Martyn Woolford's right-wing free-kick - much to the disgust of Tykes manager Keith Hill.
Stead made no mistake, thumping the ball beyond Button's flying right hand and into the corner of the net.
Adomah might have added a third moments later, as confidence surged through the City side. It was Adomah who broke clear again soon after, this time finding Stead in the penalty area only for the City striker to be denied by a point-blank save by Button, who turned a fierce shot over his crossbar.
Stead might have added another when he shook off the attentions of McNulty, but the former Blackburn striker hesitated at the vital moment and the chance was gone.
City midfielder Neil Kilkenny tested Button with a thunderous shot as time ticked away, but it mattered not, and the full-time whistle brought a pitch invasion from the jubilant home supporters.