What were the reasons for putting barriers to foreign

What were the reasons for putting barriers to foreign trade and foreign investment by the Indian Government? Why have these barriers been removed now?

Barriers to foreign trade and investment were put by the Indian government to protect domestic producers from foreign competition, especially when industries had just begun to come up in the 1950s and 1960s.
Competition from imports (except essential goods) would have dealt a death blow to growing industries. This policy was changed in 1991 became Government felt that
(i) domestic producers were now ready to compete with foreign industries.
(ii) foreign competition would improve the quality of goods produced by Indian industries.