The endogenous cannabinoids bind to and activate two G protein-coupled receptors, the predominantly central cannabinoid receptor type 1 (CB1) and peripheral cannabinoid receptor type 2 (CB2). Whereas CB1 mediates the cannabinoid psychotropic, analgesic, and orectic effects, CB2 has been implicated recently in the regulation of liver fibrosis and atherosclerosis. Here we show that CB2-deficient mice have a markedly accelerated age-related trabecular bone loss and cortical expansion, although cortical thickness remains unaltered. These changes are reminiscent of human osteoporosis and may result from differential regulation of trabecular and cortical bone remodeling. The CB2(-/-) phenotype is also characterized by increased activity of trabecular osteoblasts (bone-forming cells), increased osteoclast (the bone-resorbing cell) number, and a markedly decreased number of diaphyseal osteoblast precursors. CB2 is expressed in osteoblasts, osteocytes, and osteoclasts. A CB2-specific agonist that does not have any psychotropic effects enhances endocortical osteoblast number and activity and restrains trabecular osteoclastogenesis, apparently by inhibiting proliferation of osteoclast precursors and receptor activator of NF-kappaB ligand expression in bone marrow-derived osteoblasts/stromal cells. The same agonist attenuates ovariectomy-induced bone loss and markedly stimulates cortical thickness through the respective suppression of osteoclast number and stimulation of endocortical bone formation. These results demonstrate that the endocannabinoid system is essential for the maintenance of normal bone mass by osteoblastic and osteoclastic CB2 signaling. Hence, CB2 offers a molecular target for the diagnosis and treatment of osteoporosis, the most prevalent degenerative disease in developed countries.