Barack Obama actually said...
We obviously have a national security interest, as the President said today, in making sure that Afghanistan can't be used as a safe haven for terrorists to attack our nation again.
Context
On-the-Record Conference Call by Senior Administration Officials on Afghanistan
10/14/2015