for the past three days , joseph and hyrum had been detained in carthage by one of their most bitter enemies , justice of the peace robert f. smith , who was also captain of the carthage greys militia .