Quantile regression investigates the conditional quantile functions of a response variable in terms of a set of covariates. M-quantile regression extends this idea by a ‘quantile-like’ generalisation of regression based on influence functions. In this work, we extend it to nonparametric regression, in the sense that the M-quantile regression functions do not have to be assumed to have a certain parametric form, but can be left undefined and estimated from the data. Penalised splines are employed to estimate them. This choice makes it easy to move to bivariate smoothing and semiparametric modelling. An algorithm based on iteratively reweighted penalised least squares to actually fit the model is proposed. Quantile crossing is addressed using an a posteriori adjustment to the function fits following He . Simulation studies show the finite sample properties of the proposed estimation technique.