Nigerian soldiers have raped women and girls who fled the insurgency by militant Islamist group Boko Haram, Amnesty International has said.
Troops separated women from their husbands and raped them, sometimes in exchange for food, in refugee camps, the rights group added.
Thousands of people have also starved to death in the camps in north-eastern Nigeria since 2015, Amnesty said.
Nigeria's military has dismissed the allegations as malicious and false.
"These false reports, which are capable of derailing the good work being done by our patriotic and selfless soldiers, must stop," the military said in a statement.
Troops have been battling the insurgents since 2009 in Borno and other north-eastern states.
More than 30,000 people have been killed in the conflict, and about 1.8 million people have fled their homes.
The military has repeatedly been accused of carrying out atrocities, and the US, during the presidency of Barack Obama, refused to sell weapons to Nigeria, citing concerns about the military's human rights record.
However, the Trump administration has decided to press ahead with the sale of military aircraft and weapons, which Nigeria sees as vital to defeat the insurgents.
'He forced me to a room'
In its report, They betrayed us, Amnesty recorded the testimony of a 25-year-old woman who said a soldier raped her while she was pregnant.
"He knew I was five or six months pregnant. He said he saw me three times before. He didn't offer me any food, he called me and I ignored him but on the third day, he forced me to a room and raped me," she said.
Amnesty said it was "absolutely shocking that people who had already suffered so much under Boko Haram have been condemned to further horrendous abuse by the Nigerian military".
"Instead of receiving protection from the authorities, women and girls have been forced to succumb to rape in order to avoid starvation or hunger," it added.
Amnesty added that as the military recaptured territory from Boko Haram in 2015, it ordered people living in villages to move to satellite camps, in some cases "indiscriminately killing those who remained in their homes".
"At least hundreds, and possibly thousands, died in Bama Hospital camp alone during this time. Those interviewed consistently reported that 15 to 30 people died each day from hunger and sickness during these months," the rights group said.
It added that at least 32 babies and children, and five women, have died in detention since 2016 at the notorious Giwa barracks.
'I went into labour'
Many of those detained were victims of abductions or forced marriages by Boko Haram, Amnesty said.
"The detention of women and girls on the basis that they were allegedly married to Boko Haram members is unlawful under international human rights law and Nigerian law, and is discriminatory," it added.
One woman told Amnesty she was detained along with her husband and son.
"When we arrived in Bama prison, it was awful. People were being beaten in the yard in front of us. They started beating my husband and son. So much fear came into me. I was pregnant and I went into labour. I found the toilet and I had my baby next to it. No-one helped me. At the beginning, I didn't know if my baby was alive or dead," the 35-year-old woman said.
Is this a priority for Nigeria's military?
By Mayeni Jones, BBC News, Lagos
There is a sense of deja-vu following the release of Amnesty's latest findings. Although the number of women who admitted being raped in this report is relatively small - just nine women came forward - it is part of a wider cluster of allegations against the military.
In 2016, Human Rights Watch reported that 43 women accused officials of rape and exploitation in refugee camps in Maiduguri, the capital of Borno state. Shortly after the release of the report, President Muhammadu Buhari mandated the local government to investigate the allegations. Ten officials were arrested in December 2016 but nothing happened after that.
In the summer of 2017, Vice-President Yemi Osinbajo set up a panel to investigate human rights abuses by the military, but its findings have not yet been made public.
There needs to be a concerted and transparent effort on the part of the authorities to tackle this problem. But with security crises happening in different parts of the country, including the north-east and middle belt states, it is hard to see how this will be a priority for the Nigeria authorities - particularly given their criticism of Amnesty's report.