BANGKOK — An ambitious rice-buying program that Thailand’s ruling party hoped would aid millions of its poor rural supporters may instead help bring down the increasingly cornered government.

Hundreds of farmers from more than 10 provinces converged Thursday on the capital to demand rice payments that are several months overdue after the policy caused ruinous losses. Some have blocked three main highways in the north and the west, while a few hundred in the ruling party’s northeastern heartland protested at a provincial government hall.

With the help of populist policies such as the rice pledging scheme, Prime Minister Yingluck Shinawatra’s party won a landslide election victory in 2011. But it suffered a self-inflicted and crushing setback late last year by attempting to give amnesty to Yingluck’s elder brother, Thaksin Shinawatra, so he could return to the kingdom without serving prison time for a corruption conviction.

Ousted as prime minister in a 2006 coup, Thaksin is a highly polarizing figure, beloved in the countryside and loathed in the capital, Bangkok, where military, palace, and old money cliques have traditionally held sway over the nation.

The rice crisis comes at a difficult time for the government, which is reduced to a caretaker administration after street protests sparked by the amnesty bill forced new elections. Official results of the Feb. 2 vote may not be announced for months after protesters in Bangkok prevented some polling places from functioning, requiring by-elections. The government is also facing numerous court cases and investigations that could result in it being deposed judicially.

Now the ruling party faces the risk that the bedrock of its support, farmers, will turn against it.

‘‘We are going on the streets because we’re facing a dead end,’’ said Sombat Roek-anan, a farmer from Ayutthaya province, a stronghold of the ruling Pheu Thai party. ‘‘The farmers used to be 100 percent behind the government before the rice scheme, but now it’s 50-50.’’

Rice is Thailand’s staple grain and one of its main exports. In hopes of boosting rice prices and increasing rural incomes, the government bought harvests from farmers at about twice the price prevailing in global markets. The program backfired when the Commerce Ministry had difficulties selling the grain overseas as rival exporters such as Vietnam undercut it.

Losses from rice pledging have swelled to $4.46 billion since the policy was started in 2011, and in a blow to national pride, Thailand lost its spot as the world’s top rice exporter in 2012, surpassed by India and Vietnam. The policy also underlined a deep division in Thai society, with Bangkok’s white collar classes resenting the largesse directed at the rural poor.

Subsidizing rice has caused ‘‘tremendous losses’’ to the Thai economy, said Somkiat Tangkitvanich, president of Thailand Development Research Institute, a Bangkok think tank. ‘‘Most importantly, this scheme cannot help the farmers in a sustainable way.’’

Critics also say the policy lacks transparency, has been dogged by corruption and smugglers, and benefits farmers with large land holdings rather than poor small farmers. The International Monetary Fund last year called on Thailand to drop the subsidies.

The government’s caretaker status restricts its options for raising funds and it is struggling to find $3.9 billion to pay farmers for the current crop year. It is not selling enough of the grain overseas and Thai banks have refused to lend to the Finance Ministry, which oversees the Commerce Ministry’s funding for rice purchases.

Hundreds of employees at Krung Thai Bank protested earlier this week, urging executives to veto loans to the government.

In another blow, a Chinese state enterprise this week canceled a deal to buy 1.2 million tons of Thai rice due to a probe by Thailand’s graft police.

The Thailand Development Research Institute says the only solution is for the government to dump the rice on the world market to pay more than a million farmers.

Such a move could invite the ire of neighbors such as Vietnam and risk a battle at the World Trade Organization as other rice exporting nations seek remedies for damage to their trade. But the political risks of letting the late payment situation fester might force the government’s hand.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.