Greece were awarded a late penalty after Samaras was adjudged to have been tripped in the area by substitute Giovanni Sio, and the lanky striker calmly slotted in the spot kick in the 91st minute to take his side into knockout stage.
It was heart break for Ivory Coast as a draw would have been enough for them to advance to the next stage. Greece, who were at the bottom of Group C before the game began, finished second in the group behind Colombia.
But the game between Uruguay and Italy in Natal was marred by controversies and none other than striker Luis Suarez took the centrestage.
Suarez was at the centre of yet another biting controversy after appearing to sink his teeth into Italian defender Giorgio Chiellini's shoulder moments before Diego Godin's scored the winner for Uruguay with a header.