A new-look Middlesbrough side edged into the second round of the League Cup with victory at League One Bury.
With five players making their debuts, the visitors took the lead through Marvin Emnes's 25-yard shot after Grant Leadbitter's quickly-taken free-kick.
Bury keeper Trevor Carson spilled Nicky Bailey's effort to allow Emmanuel Ledesma to score from close range.
Mark Hughes's header from Steve Schumacher's corner closed the gap, while the hosts had Efe Sodje sent off.
The 39-year-old was dismissed in injury time for his foul on Luke Williams.