WOODBURY — Milton E. Miller IV, of Woodbury, was sentenced to five years in a state prison Friday for conspiracy to commit robbery armed with a baseball bat.

Miller pleaded guilty to conspiring for the July 23 robbery in a Woodbury man’s apartment, said authorities.

The five-year sentence requires Miller to serve 85 percent of the prison term before being eligible for parole.

“You would hope he would learn from his mistakes, but, at the age of 40, he has committed his most serious and significant offense,” said Superior Court Judge Kevin T. Smith. The judge said it appeared the robbery and beating was motivated by revenge.

A codefendant in the case, William L. Robinson, 31, of Camden, pleaded guilty to the same offense as Miller on Sept. 18 and received the same five-year sentence.