The 197th mitzvah is that we are commanded to lend money to a poor person, in order to help him and to ease his burden. This mitzvah is even greater and of more magnitude than that of giving charity; for one who has already reached the point where he has to openly ask people for money is less bothered and pained by this [having to ask for assistance] than one who has not yet reached this level. He therefore needs assistance to keep his situation from being known and reaching such a level.
The source of this commandment is G‑d's statement1 (exalted be He), "When you lend money to My people, to the poor man among you..."
In the words of the Mechilta: "Every time the Torah uses the word im ['if' or 'when'], it indicates an optional mitzvah [i.e., 'if'] except for three" — one of the three being this verse, "When you lend money to My people, to the poor man among you...."
Our Sages also said, "The verse 'When you lend money' constitutes an obligatory commandment. [The question is asked:] You said it's obligatory, but perhaps it is only optional? The Torah therefore said,2 'Extend to him any credit he needs.' This indicates that it is an obligation, not just an option."
The details of this mitzvah are explained in many passages in tractate Kesuvos3 and in Bava Basra.4