Boro released a statement on Wednesday that said a deal had been agreed for Espinosa to join them on July 1 when his contract with Spanish club Sporting Gijon has expired.
The 26-year-old centre-half has been with Sporting since 2013 and has also previously played for Sevilla and Racing Santander.
Middlesbrough, back in the Premier League next term after finishing as runners-up in the 2015-16 Championship, have already this summer recruited Denmark winger Viktor Fischer from Ajax.
Source : PA
Source: PA