The opium poppy is related to a wild poppy, P. somniferum ssp setigerum, a native of the E. Mediterranean. The Greeks of classical times grew it both for its seed and for opium, which they used medicinally as a painkiller and sleeping draught. Cultivation spread eastwards to Arabia, Persia, and India, eventually reaching China in the mid-16th century. Opium is a latex exuded from small cuts made in the unripe seed capsules. It is collected when it hardens. It may then be refined to make morphine and heroin. A small amount is used legally to make these drugs for medicinal use.