In the event that the board loans funds to a local agency, the board and the local agency may agree upon the terms and conditions of the payment of the principal and interest. The maximum term of an agreement shall be 20 years. The board may require a shorter repayment period.