Research and Analysis Wing (R&AW or RAW) is India's external intelligence agency. It was formed in September 1968, after the newly independent Republic of India was faced with 2 consecutive wars, the Sino-Indian war of 1962 and the India-Pakistani war of 1965, as it was evident that a credible intelligence gathering setup was lacking. Its primary function is collection of external intelligence, counter-terrorism and covert operations. In addition, it is responsible for obtaining and analyzing information about foreign governments, corporations, and persons, in order to advise Indian foreign policymakers. Until the creation of R&AW, the Intelligence Bureau handled both internal and external intelligence.