However, some Western countries, such as the United States, openly supported Iraq in order to contain the spread of Iranian influence in the region. The U.S. provided intelligence, financial assistance, weapons, and other support to Iraq during the war.The Iran-Iraq War ended in 1988 through a ceasefire agreement. The United Nations brokered the ceasefire, which was secured by UN Resolution 598. The agreement was signed on August 20, 1988, and officially ended the eight-year-long conflict between the two countries. The war resulted in significant human and economic losses for both Iran and Iraq.