Agreement brings to an end the politician’s threat of legal action against the lender