A method of treating a subject at risk of or suspected of having Fragile X syndrome or autism spectrum disorder associated with abnormalities of ERK includes administering to the subject a therapeutically effective amount of at least one ERK inhibiting compound that prevents abnormalities in neuronal connectivity, a prodrug thereof that is metabolisable to form the compound, or a pharmaceutically acceptable salt thereof.