A couple have been banned from going on nights out for three months to ensure they send their teenage son to school.
The parents are barred from going to the pub for three months
Neath magistrates heard the parents, who cannot be named, were going to the pub and bingo and having lie-ins rather than sending the boy, 16, to school.
The court ordered that the pair must be electronically tagged and observe the curfew between 1900 GMT and 0700 GMT.
The sentence was welcomed by education officials but condemned by prison welfare reformers.
The curfew was imposed in a prosecution brought by education welfare officers after the boy failed to go to school between September and November in his GCSE year.
The clampdown was taken after two earlier prosecutions led to fines and a parenting order but still did not stop the boy playing truant.
The court heard the pair had regular nights out at their local pub and bingo hall - and were having long lie-ins instead of getting their son to school.
The couple, both 52, appeared before magistrates last month and admitted a joint charge of knowing their 16-year-old son was absent from school without reasonable justification.
Their sentence has won backing from the boy's headmaster who said: "I support anything to make sure that children get back into school - even if it means depriving parents of their nights out.
"If children are not in school they won't learn and it could affect the rest of their lives.
"Schooling is so essential for children that we have to try everything we can to ensure they attend.
The court made an order, saying the school could not be identified.
The head said parents have a responsibility to make sure their child attends lessons, but in this case they had ignored telephone calls and letters for a year.
"I would support any action to make the parents aware of their responsibilities including electronic tagging.
"We try to work with the parents to overcome truancy, and if a child fails to attend we will contact the parents to find out why.
"Unfortunately there are occasions when this is not enough and fines or curfews are imposed by the courts, " he said.
A spokeswoman for the Welsh Assembly Government said it knew parenting was a big job and was placing emphasis on support measures, including "parenting contracts."
She said: "However we do acknowledge that unfortunately in some cases legal measures may be needed to engage parents to ensure that their children are not missing out on education and ruining their future life chances".
Dick Whitfield, chairman of the Howard League for Penal Reform, said tagging parents was "quite extraordinary".
"This is not what electronic tags were designed for. Punishing parents is not the best way to get children into school.
"In the end, it will be self-defeating and could increase tensions and difficulties in the home.
"Dealing with truancy must involve finding out exactly why the child is missing school, and looking at the wider problems within the family."