From an analysis of P31 nuclear-magnetic-resonance spectra, the chemical nature and local bonding of phosphorus in samples of amorphous hydrogenated silicon (a-Si:H) have been determined. Overlapping spectra of threefold- and fourfold-coordinated phosphorus may be separated on the basis of dipolar couplings and identified on the basis of chemical shifts. At low concentrations of phosphorus, the ratio of threefold- to fourfold-coordinated phosphorus is approximately 4 to 1. The magnitudes of the P31-H1 and H1-H1 dipolar couplings indicate that fourfold-coordinated phosphorus is located at internal hydrogenated surfaces. Finally, the increase of fourfold-coordinated sites in compensated a-Si:H suggests the formation of boron-phosphorus complexes. © 1983 The American Physical Society.