We study cooperative games with a priority structure modeled by a poset on the agent set. We introduce the Priority value, which splits the Harsanyi dividend of each coalition among the set of its members over which no other coalition member has priority. This allocation shares many desirable properties with the classical Shapley value: it is efficient, additive and satisfies the null agent axiom. We provide two axiomatic characterizations of the Priority value which invoke both classical axioms and new axioms describing the effects of the priority structure on the payoff allocation. Finally, in the special case where agents are ranked by level, a link between the Priority value, the weighted Shapley values and the Owen-type values can be drawn.