IRA distribution and American Opportunity Tax Credit

My spouse will be going to grad school this year. So this question is primarily for tax planning purpose. 


I understand I can take an early distribution of upto $10000 from my IRA for qualified education expenses. I also understand that I can claim $2500 credit for upto $4000 of my education expenses through American Opportunity Tax credit. 

Assuming the total expense is approx $10000. Am I eligible to claim both or either one. In which case I should be withdrawing only $6000 from my IRA since the remaining $4000 is covered by the American Opportunity Tax credit.