What is the difference in the meaning of the following two sentences:
Iran waged a war on Iraq.
Iran waged a war with Iraq.
As per the definition of wage, wage means "carry on". I checked the sample sentences on Oxford and found that "waged a war on" is only used in the examples mentioned here. However, I checked "waged a war with" on Google ngram and found that this combination is also used. Is it a mistake in the usage of the preposition or it has any other meaning?