Urea is primarily synthesized in the liver through the urea cycle.