The man poised to be the next Pentagon chief says he would consider changing the current plans for withdrawing all U.S. troops from Afghanistan by the end of next year if security conditions worsen.

Ashton Carter also says he is aware of reports that Islamic State militants may try to expand into Afghanistan, and says he will work with coalition partners to ensure that doesn't happen.

Carter's comments are included in his answers to a Senate Armed Services Committee questionnaire that was obtained by The Associated Press. His remarks come as Afghan leaders express concerns about the U.S. troop withdrawal and worry that local forces may not be ready to secure the country on their own.

Senators will hold a hearing Wednesday to consider Carter's nomination.