The strain compensation produced by heavy boron doping in Si1−xGex layers with x = 0.21, 0.26, and 0.34 grown by solid phase epitaxy on (001) Si wafers has been analyzed using high resolution electron microscopy, high resolution x-ray diffractometry, and ion channeling. The structure of the epilayers consists of a defect-free region located next to the layer-substrate interface and a top region which contains strain-relieving defects. In the undoped samples the defect-free layers are partially relaxed and their relaxation increases as the Ge fraction increases. Substitutional boron incorporated to the SiGe lattice to levels of 2.8 ± 0 3 × 1020 cm−3 during the growth process reduces the lattice mismatch between the epilayers and the substrate. The boron-doped, defect-free layers are thicker than the corresponding undoped layers of the same Ge content and their strain relaxation is lower. It has been shown that it is possible to grow at least 27 nm thick defect-free and fully strained heavily boron-doped layers with x = 0.21 by solid phase epitaxy.