Consumption of non-steroidal anti-inflammatory drugs (NSAIDs) is increasing and with it the danger of environmental pollution by pharmaceutical residues. Publications regarding NSAIDs in the environment not only show that they are toxic to many animal species, but also highlight the need for robust analytical methods for monitoring the level of such contaminants in environmental matrices. In our study we selected the four most widely used NSAIDs in Slovenia and Central Europe, ibuprofen, naproxen, ketoprofen and diclofenac, and studied their extraction from sediment samples. We examined several extraction techniques (ultrasonic extraction, Soxhlet extraction, pressurized liquid extraction, supercritical fluid extraction and microwave-assisted extraction) using a spiked sediment sample and determined optimal extraction conditions. After extraction we applied a clean-up step, derivatisation of the analytes and gas chromatography with mass spectrometric detection (GC-MSD) and selected the most appropriate extraction procedure. The optimised analytical method chosen for analysis of sediment samples consisted of microwave-assisted extraction, clean-up of the extract with SPE, derivatisation with MSTFA and determination with GC-MSD. The optimised procedure was applied to the analysis of two environmental river samples taken from the vicinity of Novo mesto, the biggest town in the south eastern part of Slovenia with 62,000 inhabitants, a hospital and a pharmaceutical factory in its vicinity. While analysis of the sample taken upstream of the town showed no detectable amounts of NSAIDs, analysis of samples taken downstream showed quantifiable levels of two of the studied NSAIDs (naproxen and ketoprofen). Besides these two NSAIDs, river water samples sampled at the same time and location on the River Krka also showed the presence of diclofenac. Sampling on the River Krka and other Slovene rivers will in the future be repeated at different sampling points in order to track down the main sources of pollution.