Linear alkylbenzene sulfonates (LAS), nonylphenol ethoxylates (NPE; sum of nonylphenol, nonylphenol monoethoxylate, and nonylphenol diethoxylate), and di-(2-ethylhexyl)phthalate (DEHP) are the most problematic organic pollutants in sludge owing to their high concentrations and the concentration limits of 2,600, 50, and 100 mg/kg, respectively, proposed in the European Union directive draft for land application of sludge. In this paper, an analytical method for the simultaneous determination of the C-10, C-11, C-12, and C-13 LAS homologues, the nonylphenolic compounds nonylphenol, nonylphenol monoethoxylate, and nonylphenol diethoxylate, and di(2-ethylhexyl)phthalate in compost and compost-amended soil is proposed. The method is based on sonication-assisted extraction, cleanup by solid-phase extraction, and determination by high-performance liquid chromatography with diode-array and fluorescence detectors. The mean recoveries of LAS, NPE, and DEHP were 83, 87, and 79%, respectively, in compost samples, and 77, 96, and 99%, respectively, in compost-amended soil samples. The limits of detection and quantification in compost samples were lower than 6.77 and 22.3 mg/kg dry matter, respectively, for LAS; lower than 7.34 and 22.8 mg/kg dry matter, respectively, for NPE; and 0.78 and 1.18 mg/kg dry matter, respectively, for DEHP. The limits of detection and quantification in compost-amended soil samples were lower than 0.03 and 0.10 mg/kg dry matter, respectively, for LAS; lower than 0.04 and 0.12 mg/kg dry matter, respectively, for NPE; and 0.03 and 0.10 mg/kg dry matter, respectively, for DEHP. The method was successfully applied to compost and compost-amended soil samples from Seville (south of Spain).