We formulate and analyse a stochastic epidemic model for the dynamics of rabies in both humans and stray dogs. The stochastic model, a continuous-time Markov chain, is based on the corresponding deterministic model. Analytical results show that the disease-free equilibrium is both locally and globally asymptotically stable and the endemic equilibrium is locally stable. The stochastic threshold for rabies extinction is computed using the Galton-Watson branching process and conditions for disease extinction or persistence are presented. The probability of rabies extinction obtained from the numerical simulations is in good agreement with the probability of rabies extinction from the Galton-Watson branching process. A sensitivity analysis is performed to determine the key parameters in the dynamics of rabies and to investigate the impact of culling on the probability of rabies extinction. The results of the sensitivity analysis show that the culling parameter is one of the significant parameters in the dynamics and control of rabies. We also observe from the sensitivity analysis that increasing and decreasing the value of the culling parameter increases and decreases the probability of rabies extinction, respectively.