The two lenders have agreed terms on the bid which was pitched at 340 pence per share and worth €2.3 billion or $2.5 billion, they said in a statement.
"The boards of directors of Banco de Sabadell S.A. and TSB Banking Group plc are pleased to announce that they have reached agreement on the terms of a recommended cash offer for TSB by Sabadell," the statement read.
Lloyds, which is 23-percent state-owned after a bailout at the height of the global financial crisis, will sell its remaining 50-percent stake in TSB, which it floated on the London stock market nine months ago.
The deal means that investors who bought the stock at the offer price of 260 pence will receive a 31-percent premium.
The Spanish bank described the deal as "strategically attractive" and added that it marked a "continuation of Sabadell's successful growth strategy" to expand globally.
It said the acquisition would bring benefits through enhanced scale and a broader funding and capital base.
"Sabadell believes that the UK banking market, including the market serving UK retail and SME (small and medium-sized enterprise) customers, is attractive, having a well-defined and stable regulatory framework, consistent profitability and good future growth prospects."
It added that "TSB will be able to further enhance its growth strategy and efficiency, benefiting from Sabadell's resources, experience in SME lending and experience gained in the Spanish banking market".
The announcement comes one week after the Barcelona-based bank confirmed its takeover plans, sparking a surge in TSB's share price.
The offer represents a premium of 29 percent to TSB's closing share price on March 11, one day before the two groups revealed Sabadell had lodged an informal bid.