Under black codes, many states required blacks to sign yearly labor contracts; if they refused, they risked being arrested, fined and forced into unpaid labor. Outrage over black codes helped undermine support for President Andrew Johnson and the Republican Party.