An analytical procedure is provided for analysing stress, fluid pressure and stability around wellbores in an elastic-perfectly plastic material. Examples of the application of the analytical model under sub-critical flow conditions indicate that the size of the plastic failure grows as the fluid flow rate increases. At the critical flow rate, the analytical formulation implies that the entire formation develops tensile failure and becomes unstable; a scenario that cannot be substantiated under field conditions. To investigate the mechanisms resulting in the initiation and termination of instability around wellbores, a fully coupled flow and deformation finite element model capable of tracking the formation response under tensile-failure conditions is developed. Application of the numerical model to a field problem that had experienced instability and sand production during its primary operating phase revealed that, for specific geometry and formation properties, there exists a critical fluid pressure gradient which, if exceeded, would result in sand failure and its production. The increase in permeability that occurs in the collapsed zone causes a corresponding reduction in the fluid pressure gradient to subcritical levels and hence results in the termination of sand influx. The results from the numerical study are found to be consistent with the field observations.