The content and chemical forms of P in compost are essential variables for its proper management with an agricultural purpose, especially considering the increasing P over-fertilization in agrosystems. In this study, the estimation of P content and dynamics in different composting scenarios was developed using near infrared reflectance spectroscopy (NIRS) coupled with a statistical tool for calibration, a penalized signal regression. Samples were analyzed on total P and partitioned using NaOH-solution (31)P NMR spectroscopy quantifying pyrophosphate, orthophosphate, orthophosphate diesters, phospholipids, and orthophosphate monoesters pools. According to the results obtained, total P content (r(2)=0.99 and root mean square error of cross-validation=0.53) and P forms can be estimated during composting using NIRS, as well as in the mature product, orthophosphate and orthophosphate monoesters being the most abundant P forms throughout the experiment. Penalized signal regression allows detecting the significant wavenumbers in each composting period, and also with the different P pools in the composting pile depending on time.