Former Prime Minister Yingluck Shinawatra arrives at Parliament before the National Legislative Assembly meeting. Yingluck was impeached over her controversial rice subsidy program Friday. Reuters

Former Prime Minister Yingluck Shinawatra was impeached Friday for her role in a rice subsidy program that cost the Thai government billions. The rice subsidy that was supposed to help farmers eventually saw Yingluck ousted from the government, sparked protests and led to the former government leader's expulsion from Thai politics for five years. So how did the subsidy program work exactly?

The rice program introduced in 2011 sought to buy rice from local farmers at above-market prices, stockpile them to drive up global prices, and then sell them for increased revenue. Thailand was the world’s largest exporter of rice at the time and had the clout to affect prices of the staple. The program was earlier promoted by Yingluck’s brother Thaksin, who was the former prime minister and is now exiled from the country.

The program was one of the main campaign messages that Yingluck’s Pheu Thai party ran on, winning her party a landslide election in 2011. "It helped those with lower incomes earn more," she said at her impeachment hearing on Thursday, according to Reuters. "Farmers are the backbone of the country." Farmers account for 23 percent of Thailand’s 67 million people.

The subsidy was popular with farmers initially as they expanded their production in Thailand’s rural north. "I wanted to get more money," farmer Jaroen Namhap told the Wall Street Journal. "Many other farmers in this district decided to do the same thing by expanding the amount of land used to grow rice. The government was offering such a good price. It was much better than selling to rice mills."

However, the program went south when India returned to the rice export market after a long absence, and prices dropped worldwide. Yingluck’s government began to run out of money to support the subsidy, and many farmers are still waiting for payment from the government for the rice they turned in. Rice farmers had threatened to park 100 tractors at the Thailand airport in protest.

Yingluck’s rice subsidy program supposedly cost the government some 500 billion Thai baht ($15.3 billion) in losses. Thailand’s National Anti-Corruption Commission found Yingluck guilty of corruption last May for ignoring flaws in her program to advance her populist political agenda. "The rice subsidy is fraught with weaknesses and risks at every level, leading to corruption and impacting the state budget, farmers and the country's fiscal position," Commissioner Vicha Mahakun said at a news conference announcing the panel's verdict, according to the Wall Street Journal.

The Thai Constitutional Court removed Yingluck from office in May, sparking protests from the pro-Yingluck faction known as the Red Shirts. Opposition to Yingluck’s government, comprising many of the country’s traditional elite, planned their own rallies, too. A military junta, the National Council for Peace and Order, was established at the ousting of Yingluck and has imposed martial law since May.

Thailand’s current National Legislative Assembly is mostly comprised of military officers put in place by the junta government, known for its strict censorship laws and nationalist policies. Prime Minister Prayuth Chan-ocha had said he did not order the NLA to vote to indict Yingluck, according to Reuters. Yingluck also faces criminal charges for the rice subsidy program that could see her jailed for up to 10 years.

"Thai democracy has died along with the rule of law," Yingluck said in a statement posted on her Facebook page, reported by Reuters. "I will fight until the end to prove my innocence, no matter what the outcome will be. And most importantly, I want to stand alongside the Thai people. Together we must bring Thailand prosperity, bring back democracy and truly build justice in Thai society."