Can I claim the American Opportunity Credit or Lifetime Learning Credit if I paid my college tuition with a student loan?
Yes, you can take a credit if you meet all of the other eligibility requirements.
You would take the American Opportunity Credit or Lifetime Learning Credit in the year you pay the tuition expenses, not in the year you repay the loan.