Can I claim an education credit for higher education expenses paid by a government-subsidized loan?

Yes, higher education expenses paid with the proceeds of a government-subsidized loan may qualify for the credit if you must repay the loan. Additionally, you claim the credit in the year in which you pay the expenses, not in the year in which you repay the loan.

Note: You can't claim the American opportunity credit on either an original or an amended return if either you or the student didn't have a taxpayer identification number by the due date of your return (including extensions), even if you or the student later gets one of those numbers. However, this requirement doesn't apply to any return (other than an amendment to any return) for any taxable year which includes December 18, 2015 if such return is filed on or before the due date of the return.