In distributed wireless sensor networks (WSNs), TDMA protocols are a widely applied solution when a reliable data-transferring mechanism is in demand. However, to produce a TDMA schedule is not an easy task. During the scheduling, there can be a large number of conflicts due to the nature of radio access, which leads to a waste of operating time and energy. In this paper, we first present and discuss the concept of Topological Ordering, which is based mainly on the local neighborhood size. It is aimed to create an order of scheduling that helps reduce the competition and conflicts. Next, we propose a fast and effective distributed scheduling algorithm using Topological Ordering, called DSTO, to create a collision-free TDMA schedule. This algorithm is promising in terms of reducing running time and message collisions during the scheduling phase, which in turn reduces overall message overhead. At the same time, efficient time slot allocation, which translates to a shorter frame, is guaranteed. We implement DSTO together with two other distributed scheduling algorithms on OPNET Network Modeler and thoroughly analyze the comparative results to prove its validity and effectiveness.INDEX TERMS Distributed, DSTO, scheduling algorithm, TDMA, topological ordering, wireless sensor networks.