The deal was reached just as the tax fraud case was set to begin on Monday in Barcelona, Spain.
Shakira has settled her Spanish tax fraud case right before the trial was scheduled to begin in Barcelona, Spain, on Monday.
The 46-year-old Colombian singer was being charged with tax fraud allegations amounting to €14.5 million ($15.8 million). She was facing an eight-year jail sentence and a €23.8 million ($26 million) fine if she was found guilty, the BBC reports.
According to the Associated Press, under the agreed deal, Shakira will receive a three-year suspended sentence and a fine of €7 million ($7.6 million).
Shakira was spotted leaving court on Monday in a light-pink pantsuit and matching shades, smiling and waving at fans after the deal was reached.
The "Hips Don't Lie" singer said in a statement to ET that she settled "with the best interest of my kids at heart."
Shakira is mom to sons Milan, 10, and Sasha, 8, whom she shares with ex Gerard Piqué. The singer has repeatedly denied any wrongdoing.
In her statement, Shakira shared with ET, "While I was determined to defend my innocence in a trial that my lawyers were confident would have ruled in my favor, I have made the decision to finally resolve this matter with the best interest of my kids at heart who do not want to see their mom sacrifice her personal well-being in this fight."
She added, "I need to move past the stress and emotional toll of the last several years and focus on the things I love - my kids and all the opportunities to come in my career, including my upcoming world tour and my new album, both of which I am extremely excited about. I admire tremendously those who have fought these injustices to the end, but for me, today, winning is getting my time back for my kids and my career."
The since-canceled trial was set to focus on Shakira's finances from 2012 to 2014.
It was during those years that Shakira notably joined the judges panel for The Voice in the U.S. and released her self-titled 10th studio album. Her song, "Dare (La La La)," was featured prominently for the 2014 FIFA World Cup -- for which she performed during the closing ceremony -- as part of its companion album.
Though Shakira listed her official residence those years as the Bahamas, Spanish prosecutors allege that she spent more than half that time in Spain and should have paid taxes in the country, according to the Associated Press.
AP also reports that tax authorities in Spain have cracked down on tax evasion over the last decade. Soccer stars Lionel Messi and Cristiano Ronaldo were previously found guilty of tax evasion, but the AP notes the soccer players avoided prison time because they were first-time offenders and their sentences were under two years in length.
In September, Shakira was charged with second tax evasion charges and accused of failing to pay $7.1 million in taxes on income she earned in 2018.
Authorities in Spain claimed the Colombian singer used an offshore company to avoid paying taxes.
In a statement to ET at the time, Shakira's legal team said "no notification has been received in Miami, the singer's official address, about the lawsuit in relation to the 2018 financial year."
RELATED CONTENT: