Islamist insurgents attacked two northern Nigerian state capitals on Monday, hitting a police post and setting off explosions in a market that killed at least five people, witnesses said.