This paper studies smoothing properties of the local fractional maximal operator, which is defined in a proper subdomain of the Euclidean space. We prove new pointwise estimates for the weak gradient of the maximal function, which imply norm estimates in Sobolev spaces. An unexpected feature is that these estimates contain extra terms involving spherical and fractional maximal functions. Moreover, we construct several explicit examples, which show that our results are essentially optimal. Extensions to metric measure spaces are also discussed.