Conjointly with the spread of writing, the first formal schools were established, usually under the auspices of a city-state's primary temple