Spain's Supreme Court has upheld the conviction of a priest for the sexual abuse of two 12-year-old boys and confirmed a lower court's sentence of 17 years and seven months in prison.

A Supreme Court statement issued Wednesday said the judges also rejected an appeal by the Romanian parents of one of the boys. They lived with the priest, Jose Fernandez, and were found guilty of consenting to his abuse of their son and sentenced to four years in prison.

The other victim was an altar boy at the priest's church in Badajoz, in southwestern Spain.

The Supreme Court said it was proven that Fernandez committed the crimes in 2013 and 2014. A Badajoz court found the defendants guilty, but they appealed to the higher court.