Emerging applications of wireless sensor networks require accurate event detection while coping with in-network congestion, delay, power and probability of false alarm (PFA) constraints. Dynamic spectrum access stands as a promising and spectrum-efficient communication approach for resourceconstrained wireless sensor networks. In this paper, we propose a two tier sensor network where the lower tier comprises a multi-hop sensor network with a secondary user (SU) as a cluster head, and the upper tier consists of a network of secondary users competing for spectrum in order to relay their messages to the sink node. The lower tier is therefore responsible for accurately detecting an event, whereas the upper tier is responsible for relaying the detection to the sink node efficiently. We incorporated two Constrained Markov Decision Processes (CMDP): one for accurately detecting an event while satisfying delay, PFA and congestion constraints by adjusting the detection criterion, and the other for allocating the best available spectrum to the SU on a priority basis.