A stochastic model for the spread of an SIS epidemic among a population consisting of N individuals, each having heterogeneous infectiousness and/or susceptibility, is considered and its behavior is analyzed under the practically relevant situation when N is small. The model is formulated as a finite timehomogeneous continuous-time Markov chain X . Based on an appropriate labeling of states, we first construct its infinitesimal rate matrix by using an iterative argument, and we then present an algorithmic procedure for computing steadystate measures, such as the number of infected individuals, the length of an outbreak, the maximum number of infectives, and the number of infections suffered by a marked individual during an outbreak. The time till the epidemic extinction is characterized as a phase-type random variable when there is no external source of infection, and its Laplace-Stieljtes transform and moments are derived in terms of a forward elimination backward substitution solution. The inverse iteration method is applied to the quasi-stationary distribution of X , which provides a good approximation of the process X at a certain time, conditional on non-extinction, after a suitable waiting time. The basic reproduction number R 0 is defined here as a random variable, rather than an expected value.