Although both gamma-rays and X-rays damage DNA causing mutations and death of cells, X rays are more frequently used in the treatment of cancer. X-rays are produced by linear accelerators whereas gamma-rays are produced in cobalt systems due to radioisotopes decay. Linear accelerators producing X-rays can be more accurately controlled and can deliver higher power radiation to cancerous tumors. As radioactive decay is spontaneous and cannot be regulated, linear accelerators can be controlled and are less dangerous. Overall, radiotherapy based on the X-rays is more frequently used to treat cancerous tumors than gamma-rays.