LONDON (Reuters) - HSBC HSBA.L drew a line under its punishment for lapses in anti-money laundering controls on Monday, saying the U.S. Department of Justice (DoJ) would end its deferred prosecution agreement, lifting the threat of further penalties.

The Angel of Independence monument is seen near a building of HSBC in Mexico City January 23, 2015. REUTERS/Edgard Garrido

Europe’s biggest bank paid a $1.9 billion fine and entered into the five-year deal in 2012 for failing to prevent Mexican drug cartels from laundering hundreds of millions of dollars.

Under the deal, HSBC pledged to strengthen its sanctions and anti-money laundering controls. It had successfully done this and the DoJ will therefore file a motion to dismiss the charges that had been deferred by the agreement, HSBC said.

“While we still have improvements to make and work to do, this shows the DPA has worked in the way intended which was to lead to a transformation in the way HSBC manages financial crime risk,” Stuart Levey, Chief Legal Officer at HSBC, said.

In a deferred prosecution agreement a prosecutor grants an amnesty in exchange for the defendant agreeing to fulfil certain requirements, often including the payment of a fine and a pledge to avoid further bad behaviour.

U.S. prosecutors in 2012 said that in February 2008, Mexican authorities told the CEO of HSBC’s Mexico unit that a local drug lord referred to the bank as the “place to launder money”.

Lax money laundering controls at HSBC allowed two cartels - one each in Mexico and Colombia - to move $881 million in drug proceeds through the bank over the second half of the last decade, according to documents in the case.

Following its signing of the DPA in 2012, HSBC embarked on a worldwide programme of upgrading its compliance systems to U.S. standards, raising its spending to more than $1 billion a year.

As part of the agreements with the U.S. prosecutors and Britain’s Financial Conduct Authority (FCA), HSBC also installed an independent monitor charged with producing annual reports on the progress of its reforms on fighting financial crime.

The bank said on Monday that the monitor, former U.S. district attorney and financial crime expert Michael Cherkasky, would continue in his FCA capacity for an unspecified time.

HSBC shares rose 2.5 percent, the most among major European banks, as the STOXX European index of 600 lenders .SX7P rose by 0.28 percent.