One of the most crucial and complicated phases of system development lies in the transition from system behavior (generally specified using scenario models) to the detailed behavior of the interacting components (typically captured by means of communicating hierarchical finite state machines). This transition constitutes the focus of this paper. Our standpoint is that in order to succeed with this transition, it is not sufficient to grasp the details of individual scenarios, but also to understand the relationships that exist between the scenarios. Our claim is that different types of scenario relationships result in different hierarchical state machine structures. We identify and describe four different types of scenario relationships: containment dependency, alternative dependency, temporal dependency, and functional dependency. We also illustrate how such scenario relationships can be expressed in UML using stereotypes and how they guide the design of the corresponding hierarchical state machines.