The United States military wrote to Iraq on Monday saying it would pull out of the country and would be repositioning forces over the next few days and weeks, a letter seen by Reuters showed.