Pakistan and Spain each plan to deploy some 500 military personnel .