Through gene targeting based upon homologous recombination in embryonic stem cells, a chosen gene can be inactivated and eventually a strain of mutant mice created. We have devised a procedure to specifically replace a targeted gene by another gene. A murine homeobox gene was disrupted at high frequency in embryonic stem cells by its replacement with Escherichia coli lacZ. Injection of such stem cells into blastocysts yielded chimeric embryos in which beta-galactosidase activity was driven by the Hox-3.1 promoter. This technique will allow the visual assessment at the cellular level of gene inactivation effects in transgenic mice.