Environmental phenomena typically exhibit weakening spatial dependence at increasingly extreme levels. Limiting max-stable process models for extremes have a rigid dependence structure that does not capture this type of behavior. Further, full likelihood-based inference has proven to be challenging for max-stable models, and a limitation in their application to large spatial datasets. We propose a flexible model from a broader family of max-infinitely divisible processes that allows for weakening spatial dependence at increasingly extreme levels, and due to a hierarchical representation of the likelihood in terms of random effects, scales to comparatively large datasets. The proposed model is constructed using flexible kernel functions in a form that allows for straightforward inspection of the predominant patterns in the spatial distribution of extremes. In addition, the model possesses the max-stability property as a special case, making inference on the tail dependence class possible. To illustrate our method, we apply it to extreme precipitation in eastern North America.