Patel first contested the election to the Lok Sabha, the lower house of the Indian Parliament, in 1967. Contesting from the Swatantra Party, Patel lost due be being largely unknown to the electorate. Following the defeat of Indira Gandhi's Congress Party in the 1977 elections that ended the Indian Emergency, Patel was appointed the Finance Minister by the new Prime Minister Morarji Desai, who was leading India's first non-Congress administration. He changed many of India's socialist economic policies, ending barriers to foreign investment and reducing tariffs while protecting home industries. He was responsible for the policy that all foreign companies must form corporations with an Indian company holding a 50 per cent stake, which caused Coca-Cola to pull out of India, but most others did not.