Given nanshoku's long history, it is little wonder high officials in the late 1700s were astonished to learn that Western countries severely punished male-male sex, even if the younger partner was willing. After the overthrow of the shōgun, Japan briefly had a law prohibiting same-sex practices. It banned anal intercourse and was in effect from 1873 to 1880, when it was repealed and an age of consent established at twelve, raised to thirteen in 1907. Today there are age-of-consent laws at the prefectural level prohibiting sexual relations with those under eighteen.