The changes that occur are greatest wherever the magma comes into contact with the rock because the temperatures are highest at this boundary and decrease with distance from it .
The changes that occur are greatest where the magma comes into contact with the rock .