Lucas Hernández playing for Bayern Munich at Allianz Arena on May 22, 2021.
CNN  — 

France and FC Bayern Munich defender Lucas Hernández has until October 28 to voluntarily enter prison after breaking a restraining order in 2017.

The 25-year-old was sentenced to six months in prison by a Madrid court last week for breaking a restraining order following a 2017 conviction of domestic violence against his then-girlfriend and now wife, Amelia de la Osa Lorente.

Hernández appeared in a Madrid court on Monday and now has 10 days to voluntarily begin his six month sentence.

Neither FC Bayern Munich nor Hernández’s lawyers have responded to CNN’s request for comment.

Hernández had been given two previous criminal sentences in relation to the February 2017 incident.

The defender was arrested by Spanish police in February 2017, when he was an Atlético Madrid player, after a fight with his then-girlfriend who was taken to hospital with minor injuries.

Although neither filed a complaint against the other, both were sentenced to 31 days community service and ordered not to see each other for six months by Spain’s public prosecutor.

Four months later Hernández was arrested in Madrid after traveling with his then-girlfriend, Osa Lorente and breaking his restraining order.

In December 2019, Hernández, now at German football club FC Bayern Munich, was sentenced to six months in prison for breaking the restraining order when he and Osa Lorente landed back in Madrid after getting married in the United States.

Hernández has made 29 appearances for France, winning the 2018 World Cup and most recently helped his country win the 2021 UEFA Nations League.