Hospitalization due to an illness increases a person's risk of committing suicide, says a new study.

Danish researchers studied over 27,000 suicide cases and matched them with a control group of more than 468,000 people who acted as the control group in the study.

Researchers found that hospitalization was reported in more than 60 percent of the suicide cases compared to about 40 percent in the control group. Women were more likely to commit suicide due to hospitalization than men.

Physical illness accounted for 24 percent of the suicide risk in the total population whereas for women it accounted for 32.3 percent of suicide risk according to the study.

"The results from this population study indicate the need to integrate suicide prevention within hospital treatment as well as within general medical practice. Patients hospitalized for physical illness not only form a well-defined population group at high risk of suicide, but also maintain frequent contact with their general practitioner after hospital discharge. This provides opportunities for both risk assessment and prevention," the authors wrote.

People from all socio-economic classes were at almost same risk of committing suicide. In general, the severity of the illness was a major contributing factor in people committing suicide. Researchers say that physicians must be aware of this risk factor while treating people who've had illness that affects many organs.

"Physical illness constitutes a significant risk factor for suicide independent of psychiatric and socioeconomic factors. Clinicians treating physically ill patients should be aware of the risk, especially among those with multiple or recent hospitalisations, or multiple comorbidities," the authors concluded.

Other studies have shown that a "wish to die" increases a medically ill person's risk of dying over a 5 year period even if the person is not diagnosed with depression.

The study was published in Journal of Internal Medicine.