NEW DELHI -- India struggled to attract fresh foreign capital in fiscal 2017, dealing a setback to Prime Minister Narendra Modi's effort to promote job-creating industries ahead of a general election next year.

Foreign direct investment inflows grew just 3% -- the slowest pace in five years -- to $61.96 billion for the fiscal year ended in March, government data shows.

The telecommunications and auto industries fared well, with inflows up 12% and 30%, respectively. But investment tumbled 23% in services, which includes finance and insurance and ranks as the largest beneficiary of foreign spending.

Foreign direct investment initially surged after Modi's government came to power in 2014, rising 25% in fiscal 2014 and 23% in fiscal 2015, but growth slid to 8% in fiscal 2016.

Last year's slowdown seems to owe partly to the July 2017 introduction of a unified goods and services tax, as concern about confusion under the new system apparently led businesses to put off investment. Monthly data on foreign capital inflows showed year-on-year drops of 30% to 60% in September through November.

Despite the deceleration, foreign direct investment set an all-time high for a third consecutive year. N.R. Bhanumurthy, an economist at the New Delhi-based National Institute of Public Finance and Policy, applauded India's ability to attract so much capital while many countries favor protectionism over investing abroad.

Modi's government seems to take a different view. In April, when fiscal 2017 data was being tabulated, a senior economic official said the prime minister's office had instructed against making public comments on foreign direct investment. Inflows declined year on year in rupee terms, a touchy point for the administration, the official said.

Modi initiatives like "Make in India" are supposed to draw foreign money and technology into the country, fostering local industries, creating jobs and winning support for his government. His Bharatiya Janata Party has racked up wins in local elections by campaigning on development and investment.

The slowdown in capital inflows threatens to derail this strategy.

The administration's economic policies have become fodder for opposition critics ahead of a general election due in April or May 2019. Rahul Gandhi, head of the main opposition Indian National Congress, said last month that Modi had pledged to create jobs for 20 million young people a year, yet unemployment sits at an eight-year high.

The prime minister, who seeks a second term, rebuts this criticism with delayed jobs data. The government recently released a new measure of employment based on enrollments in state social security and pension systems. These figures showed 4.1 million formal jobs created in eight months, Modi told local media.

India's economic growth accelerated to 7.7% on the year for the three months through March, the highest in seven quarters. The country climbed to 100th from 130th in the World Bank's Ease of Doing Business ranking last year. Foreign multinationals find it easier to plan long-term investment, Bhanumurthy said.

But Modi now faces greater macroeconomic challenges, including rising fuel costs and a falling rupee. His party may struggle next year if he cannot show voters clear results, including more foreign investment.