Shakira, an international pop singer, has reached a settlement with Spanish prosecutors in a tax fraud case worth millions of Euros. The deal was made on Monday just hours before the Barcelona court trial began.

Shakira had been accused by the prosecution of six counts of fraud for failing to pay her income tax of 14.5 millions euros (about $15.8million). According to the Associated Press, Shakira told the presiding judge in court that she had reached an agreement with prosecutors. The A.P. reported that, under the deal, she would receive a three-year suspended sentence and a fine of €7 million.

Shakira’s full name, Shakira Isabel Ripoll Mebarak, was accused by the Spanish government of not paying income taxes from 2012-2014. Shakira repeatedly denied the allegations and claimed that she had not lived in Spain during these years.

In a July indictment the prosecutors claimed that Shakira has spent over half of every year in Spain between 2012-14, and used a previously established “corporate framework” Hide income and assets in those years.

Prosecutors had sought an eight-year prison sentence and a fine of more than €23 million.

Shakira, in a statement released on Monday, said she had always been a fighter. “do what’s right and set a positive example for others.”

“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,” She said