A Brazilian mayor who governed her town via WhatsApp has been jailed for at least 14 years for embezzling millions from its education budget, Dec. 4, 2017. In this photo, logo of WhatsApp, the popular messaging service, seen on a smartphone in New York, Feb. 20, 2014. Getty Images

A Brazilian mayor, who is said to have governed her town via the smartphone message service WhatsApp, has been jailed for at least 14 years and one month followed by six years of house arrest for embezzling millions from the town’s education budget, reports said Monday.

Lidiane Leite went on the run in August 2015 when she was accused of taking the money from the school system of the town of Bom Jardim, situated in Brazil’s north-west.

The 27-year-old, who lived a life of luxury in the capital of Maranhao state around 180 miles away, directed local officials in her cabinet only using WhatsApp. She eventually surrendered after 39 days on the run in 2015. An arrest warrant was issued against her at the time.

On Monday, following a two-and-a-half year legal battle, she was sentenced to 14 years and one month in prison and then six years of house arrest, after she was found guilty of taking £4.5m ($6.29m) from an education fund, the Independent reported.

Leite can appeal the decision, the TNH1 news channel reported.

An arrest warrant was also issued against her boyfriend in 2015. The saga began in 2012, after her former boyfriend, Humberto Dantas dos Santos, who was also called Beto Rocha, was banned from running for mayor of the town in 2012 for alleged corruption.

Shortly afterward, Leite stepped in and ran in his place and appointed the 44-year-old Rocha as her chief advisor and she went to live in the capital of Maranhao state. Rocha was responsible for most of the town’s day-to-day management, while Leite directed her cabinet through WhatsApp. She reportedly had a WhatsApp group called "Task Force."

"She was too young and inexperienced when she took office," her lawyer, Carlos Barros had said in 2015. "She lacked confidence and delegated many tasks to Mr. Rocha."

Rocha and Liete ended their relationship in the beginning of 2015 and Rocha had resigned, following which their corruption scheme started to unravel.

Rocha is still on the run but has also been sentenced to 17 years and nine months in jail followed by seven years and four months of house arrest in absentia.

Maranhao, located in north-eastern Brazil, is one of the country's poorest states and the town of Bom Jardim houses around 40,000 people.

Many families rely on the local school to provide their children at least one decent meal a day. Locals told BBC earlier that during Leite’s tenure they never had food at the school, which had first prompted the authorities to conduct an investigation into the mayor and her associates.

The authorities then began to look at Leite’s social media feeds where she repeatedly bragged about her glamorous life of luxury.

One post on her Instagram reportedly said: "Before I became mayor, I was poor. I had a Land Rover, now I drive a [Toyota] SW4. Maybe I should buy a more luxurious car, because – thank you God – I have enough money to do it."

"I can buy whatever I want. I’m going to spend money on what I want and I don’t care what people say about me," it added, according to the Independent.