Designing a sensor network congestion avoidance algorithm is a challenging task due to the application specific nature of these networks. The frequency of event sensing is a deciding factor in the occurence of congestion. Numerous sensors, simultaneously transmitting data, increase the probability of packet drops due to congestion close to the base station(s). In this paper, we propose a novel distributed congestion avoidance algorithm which uses the ratio of the number of downstream and upstream nodes along with available queue sizes of the downstream nodes to detect incipient congestion. Monitoring queue sizes of candidate downstream nodes helps ensure effective load balancing and fairness in our avoidance algorithm. Through simulation studies we observe a greater packet delivery ratio and higher network lifetime in comparison with other prevalent mechanisms.