Two issues in the extended finite element method (XFEM) are addressed: efficient numerical integration of the weak form when the enrichment function is self-equilibrating and blending of the enrichment. The integration is based on transforming the domain integrals in the weak form into equivalent contour integrals. It is shown that the contour form is computationally more efficient than the domain form, especially when the enrichment function is singular and/or discontinuous. A method for alleviating the errors in the blending elements is also studied. In this method, the enrichment function is pre-multiplied by a smooth weight function with compact support to allow for a completely smooth transition between enriched and unenriched subdomains. A method for blending step function enrichment with singular enrichments is described. It is also shown that if the enrichment is not shifted properly, the weighted enrichment is equivalent to the standard enrichment. An edge dislocation and a crack problem are used to benchmark the technique; the influence of the variables that parameterize the weight function is analyzed. The resulting method shows both improved accuracy and optimum convergence rates and is easily implemented into existing XFEM codes. Copyright © 2008 John Wiley & Sons, Ltd.