With the failure of the United States to persuade India to join an anti-communist pact, it turned towards Pakistan, which in contrast with India was prepared to join such an alliance in return of military and economic aid and also to find a potential ally against India. By 1954, the US had decided that Pakistan along with Turkey and Iran would be ideal countries to counter Soviet influence. Therefore, Pakistan and the US signed the Mutual Defense Assistance Agreement and American aid began to flow into Pakistan. This was followed by two more agreements. In 1955, Pakistan joined the South East Asian Treaty Organization (SEATO) and the Baghdad Pact, later renamed the Central Asian Treaty Organization (CENTO) when Iraq withdrew in 1959.