Middlesbrough left it late to consign Championship leaders Leicester City to a second consecutive defeat courtesy of Sam Greenwood's stunning free-kick.
Leicester came close to taking a first half lead first through Kiernan Dewsbury-Hall's header before Ricardo Pereira's shot was well blocked by the hosts.
Dael Fry almost sent Boro in on top at the break when he headed goalbound from the near post but the Foxes scrambled to keep his effort out of the net.
Boro eventually scored an 83rd-minute winner in impressive fashion as Greenwood whipped a free-kick into the top corner from long range.