This paper tackles the problem of inference in normative systems where norms concerning actions and states of affairs appear together. A deontic logic of actions and states is proposed as a solution. It is made up of two independent deontic logics, namely a deontic logic of action and a deontic logic of states, interlinked by bridging definitions. It is shown at a language and a model level how an agent should look for norms to follow in a concrete situation. It is pointed out that such specific norms are obtained by finding the most specific obligation and the most general prohibition. They are to be derived from all norms applicable to the situation by using the principles of the logic presented in this paper.