Gareth Geddes from Stranraer appeared for sentencing after being found guilty at a trial of repeatedly kicking and punching the child to his severe injury in December 2012 at an address in Stranraer.
Defending, solicitor Kay Christie told the court that Geddes still maintained his innocence despite the findings of the jury and planned to appeal.
Sentencing, Sheriff Kelly said that he had read the reports prepared on Geddes in which the accused had originally said “he deserved all he got”.
He imposed a prison sentence of four years with a two year extended sentence and put Geddes on the register of those unsuitable to work with children.
The child suffered no long term injury.