Ten-man Stoke City lost their unbeaten UEFA 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, manager Tony Pulis left all 11 players who started against Tottenham Hotspur 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 four a foul Hugo Almeida, and goals from substitutes Mustafa Pektemek and Edu secured the points.
Pulis left Jermaine Pennant on the bench , with the former Arsenal man named as one of only four substitutes while Besiktas were without dangermen Ricardo Quaresma and Simao through injury.
The match always looked to be Stoke's toughest test in the group irrespective of team selection, and those fears were quickly realised as the hosts raced out of the blocks. The Inonu Stadium is officially the loudest in the world and it was rocking. Interim coach Carlos Carvalhal remained in charge tonight on the highly-charged occasion.
In the early stages, the only thing standing between Besiktas and the lead they craved was Begovic, who saved well from Fabian Ernst, Veli Kavlak and Almeida.
Cameron Jerome missed a glorious chance for Stoke from virtually 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 before a hectic period of play concluded with him hitting the bar in bizarre circumstances.
Goalkeeper 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. He collided with the post in the process but was able to continue after treatment, while at the other end Begovic pulled off another fine save from a low Fernandes shot before being booked for time-wasting.
Besiktas brought on top scorer Pektemek for the second half and he was straight into the action with an ambitious strike from 25 yards that flew just over the bar.
In the 59th minute, the game turned decisively in the home side's favour. Upson was sent off for a challenge on Almeida and Fernandes easily dispatched the spot-kick, sending Begovic the wrong way. It was harsh on the keeper, but he produced his best save of the night five minutes later when he somehow kept out a Fernandes volley from 12 yards.
Stoke were desperately trying to hold on to their point but in the 74th minute Besiktas took the lead they had been threatening all game when Fernandes' corner was headed in acrobatically by Pektemek. The Turkish side 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.
Having won seven and drawn two of their previous nine games in the competition, it was a disappointing way for Stoke to finish, but they will still go into the last 32 with plenty of confidence.