NEW DELHI — India’s finance minister on Thursday announced a federal budget with a string of populist giveaways, from affordable housing to a health plan for millions of the poor, in an attempt to woo voters ahead of national elections next year.

Speaking in Parliament, Finance Minister Arun Jaitley also announced a liberalization of agricultural exports, which will increase from $30 billion a year to $100 billion, to help push up crop prices for farmers. Exports of many agricultural products have long been restricted by regulations.

The government will also help build more than 5 million affordable houses for the poor in the next financial year, which goes from April 1 to March 31.

India’s stock market took a hit after Jaitley announced a 10 percent tax on some long-term capital gains, saying stock market returns were “quite attractive and it was time to bring them under the ambit of capital gains tax.”

He announced no changes for personal income tax rates.

“This is an election budget,” said M.S. Unnikirishnan of the Confederation of Indian Industry, a powerful trade group. “It’s good at the macro level with the government keeping the fiscal deficit at 3.5 percent of the gross domestic product.” India’s economy totals $2.5 trillion.

To help millions of farmers, Jaitley raised prices for rice and other crops to at least 50 percent more than the cost of production. Prices are currently set at a 20 percent markup. He also increased the target for farm loans by 10 percent to more than 10 billion rupees ($150 million).

Thousands of farmers take their own lives each year in India as failed harvests force them to borrow money at high interest rates to buy seeds, fertilizer and even food for themselves and their cattle. They often mortgage their lands.

This is the last budget of Prime Minister Narendra Modi’s government, which will seek a second five-year tenure in May 2019 national elections. The new government will determine the full-year budget for 2019-20.

The minister announced the creation of a health care program for 100 million poor families, providing free hospitalization up to 500,000 rupees, or $7,500, per person. But Jaitley did not explain how the program would be funded or organized in a country with a desperately underfunded and chaotic public health system.

He also said 80 million women would be given free connections for liquefied cooking gas, which cost about $45 apiece, and 40 million poor families would get free electricity connections, which cost $12-$20.