what time did this take place, if it was around the 1700s it should be the French and Indian War, it should be England & Portugal, if it's not I'll adjust my answer
The branches of government have differing powers.
Probably in several ways, but the most obvious is that the United States has not tried to overturn the government of Afghanistan. The ostensible effort in that country has been to attack terrorist groups that may or may not be based in Afghanistan, not the state. In Iraq and Libya, other conflicts the United States either instigated or participated in, the effort was to overturn and replace the actual government of those nations. Even in our somewhat limited involvement in the Syrian civil war, the stated objective has been to overthrow the dictatorship of the Assad government.