A fourth defendant was sentenced to life in prison, prosecutor Ujjwal Nikam said. He said he asked for the death sentence under a strict anti-rape law introduced following public outrage over a fatal gang rape in New Delhi in 2012.
"This is the first case in India in which the death penalty has been given to convicts while the victim is alive," Nikam said.
The three men were found guilty last month of raping a call-center operator at the same abandoned mill in July 2013, a month before the attack on the photojournalist. Nikam described the three as habitual offenders.
Judge Shalini Phansalkar-Joshi said the offense was diabolical in nature and the punishment would send a strong message to society.
India increased penalties for sex crimes and moved rape trials faster through its notoriously slow justice system after a 23-year-old medical student was gang raped on a moving bus in the capital and later died. Four men were sentenced to death in the New Delhi case. The trials in New Delhi and Mumbai cases were completed within seven months.
The four men convicted in the Mumbai case can appeal the death sentence in an appeals court within three months.
Also Friday, 24 men were sentenced to prison for raping a teenager who was abducted in Kerala state in 1996. A court had acquitted all but one defendant in 2005, but India's top court ordered a retrial last year. It was completed in six months, prosecutor Anella George said.
One man was sentenced to life in prison and 23 others to 7 to 11 years, George said.
The 16-year-old victim was abducted and raped in homes, hotels, cars and public buses over one and a half months. The men convicted in Ernakulam town included a retired professor, lawyers, businessmen and government officials.