Ten-man Stoke lost their unbeaten Europa League record and had to settle for second place in Group E as Besiktas came from behind to triumph 3-1 in Istanbul.
With the Potters having already qualified for the last 32, boss Tony Pulis left all 11 players who started against Tottenham last weekend at home but then saw his side take an unlikely 29th-minute lead through Ricardo Fuller.
Asmir Begovic had been superb in keeping Besiktas at bay but in the 59th minute Manuel Fernandes equalised from the penalty spot after Matthew Upson was sent off for felling Hugo Almeida, and goals from substitutes Mustafa Pektemek and Edu secured the points.
The match always looked Stoke's toughest test in the group, and those fears were quickly realised as the hosts raced out of the blocks, with the only thing standing between Besiktas and the lead they craved being Begovic, who saved well from Fabian Ernst, Veli Kavlak and Almeida.
Cameron Jerome missed a glorious chance for Stoke from their first attack in the 16th minute, but 13 minutes later Fuller did give the visitors an unlikely advantage, picking up the ball 25 yards out and sending a shot in off defender Egemen Korkmaz.
The Jamaican, who had already earned the wrath of the crowd and been booked for persistent fouling, then appeared to complain he had been hit by something thrown from the stands before a hectic period of play concluded with him hitting the bar in bizarre circumstances.
Keeper Rustu Recber hesitated over a clearance and slammed the ball straight against Fuller, making his first start since rupturing an Achilles in April. It sailed way into the air before bouncing against the woodwork, with the striker just failing to turn in the rebound.
The game was held up early in the second-half as Jermaine Pennant, a first-half substitute for Andy Wilkinson, refused to take a corner while he was seemingly pelted with objects thrown by the crowd. Several Besiktas players appealed for calm and referee Marcin Borski went to speak to the home bench before restarting play.
In the 59th minute the game turned decisively in the home side's favour. Upson complained he got the ball in his challenge on Almeida but replays suggested the decision was probably correct and Fernandes easily dispatched the spot-kick, sending Begovic the wrong way.
Besiktas took the lead in the 74th minute when Fernandes' corner was headed in acrobatically by Pektemek. And the Turks then made sure of the points and victory in the group when substitute Edu rifled a shot into the far corner from the edge of the box in the 82nd minute.