Strike-slip faulting in an inhomogeneous medium is analyzed applying a two-dimensional model consisting of a mode 3 crack in the presence of an elliptic inclusion, making it possible to assess the effect of a localized or layer type inhomogeneity on faulting. The dominant feature that characterizes and controls faulting in an inhomogeneous medium is the spatial variation of the effective shear stress. The variation range may explain diversified values of the stress drop for seismic events from the same region. The most striking trait of the stress field in the medium that contains a low-rigidity inhomogeneity is a great reduction of the effective shear stress within the inhomogeneity. This result suggests an explanation for the suppression of dynamic rupture in sediments. The same reason may also be a major cause for which the plate motion in the upper seismogenic part of the Earth's crust along vertical strike-slip faults located in low-rigidity media is accommodated by afterslip or creep.