A radiographic image processing apparatus includes a hardware processor, which determines the intensity of an edge in a radiographic image obtained by radiographically imaging a subject, sets a weighting factor to be used in extracting a frequency component from the radiographic image according to a determination result of the edge intensity, extracts the frequency component from the radiographic image using the weighting factor having been set, multiplies the extracted frequency component by a scattered radiation content rate to estimate a scattered radiation component in the radiographic image, multiplies the estimated scattered radiation component by a scattered radiation removal rate to generate a scattered radiation image representing the scattered radiation component to be removed from the radiographic image, and performs scattered radiation correction on the radiographic image by subtracting the scattered radiation image from the radiographic image.