Peru declared a state of emergency in two provinces after protests against a mining project turned violent Saturday.