The violence started when inmates broke into another section of the prison where members of a different faction were being held, Capt Falkner Ferreira was quoted as saying by G1 website (in Portuguese).
The prisoners were armed with knives and wooden sticks, a witness said.
Reports say there are 1,400 inmates currently in the prison, which has a capacity of up to 740.
Brazil has the world's fourth largest prison population, with some 600,000 inmates.
Correspondents say that many poorly resourced and overcrowded jails across the country are in effect run by powerful crime gangs.
Image copyrightAPImage captionThe girls were welcomed by their relatives in a ceremony in Abuja
Twenty-one schoolgirls who had been kidnapped by the Islamist group Boko Haram in the Nigerian town of Chibok have been reunited with their families.
In an emotional ceremony in the capital Abuja, one of the girls said they had survived for 40 days without food and narrowly escaped death at least once.
It is unclear how the release was negotiated, but an official says talks are under way to free some more girls.
Of the 276 students kidnapped in April 2014, 197 are still missing.
One of the girls freed said during a Christian ceremony in Abuja: "I was... [in] the woods when the plane dropped a bomb near me but I wasn't hurt.
Many of the kidnapped students were Christian but had been forcibly converted to Islam during captivity.
Another girl said: "We never imagined that we would see this day but, with the help of God, we were able to come out of enslavement."
Excited relatives were waiting to be reunited with the girls, who were released last Thursday.
One parent said: "We thank God. I never thought I was going to see my daughter again but here she is... Those who are still out there - may God bring them back to be reunited with their parents."
Image copyrightAFPImage captionBoko Haram has shown some of those kidnapped in its propaganda videos
Nigerian authorities have denied reports that captured Boko Haram fighters were swapped for the girls. But one security official told the BBC that four commanders had been freed.
The AP news agency also reported that a "handsome ransom", in the millions of dollars, was paid by the Swiss government on behalf of the Nigerian government.
Nigeria's Information Minister Lai Mohammed said Thursday's release was "the first step" for the liberation of all the remaining girls.
"Already we are on phase two and we are already in discussions," he told journalists on Sunday.
"But of course you know these are very delicate negotiations, there are some promises we made also about the confidentiality of the entire exercise and we intend to keep them."
Image copyrightAPImage captionNigeria's Vice President Yemi Osinbajo (right) welcomed the released girls
Some of the kidnapped girls managed to escape within hours of their kidnapping, mostly by jumping off lorries and running into nearby bushes.
In total, 219 girls were captured and taken away. But it appears that some of the girls may have died in captivity.
And reports say that, following more than two years in captivity and after being married off to Boko Haram fighters, some of the girls do not want to go home.
In an address broadcast on state television in the early hours of Monday (local time), Mr Abadi said: "The hour of victory has come, the operation to liberate Mosul has started."
"Today I declare the start of the heroic operations to liberate you from Daesh," he said, using another name for IS.
"God willing we will meet in Mosul to celebrate the liberation and your salvation from Isis (IS) so we can live together once again, all religions united and together we shall defeat Daesh to rebuild this dear city of Mosul."
Image copyrightIRAQI PM/APImage captionA statement was read on state TV early on Monday
Surrounded by senior Iraqi officers, he vowed that only government forces would enter Mosul, a Sunni-majority city.
This, analysts said, was an attempt to counter fears that the operation could turn into a sectarian conflict.
US Secretary of Defence Ash Carter described it as "a decisive moment" in the campaign to deliver IS "a lasting defeat". But he added that it would be a "difficult fight".
Battle for Mosul
In numbers
700,000
estimated population left
4,000 to 8,000 estimated number of IS fighters
25,000 troops expected to take part
AFP
It was from Mosul that IS leader Abu Bakr al-Baghdadi declared a caliphate - a state governed in accordance with Islamic law - in territory controlled by the group in Iraq and Syria.
An operation to retake the city, capital of the northern Nineveh governorate, has been planned for months, and analysts say it could last for weeks, if not months.
Image copyrightORLA GUERIN/BBCImage captionThe BBC's Orla Guerin is with Peshmerga forces near Mosul: "Kurdish general says if he dies in battle today he will die a happy man because he has done something for his people"
Thousands of pro-government forces have gathered at an airbase in the strategic town of Qayyarah, about 60km (37 miles) south of Mosul, which was recaptured in August.
Thousands of leaflets have been dropped warning residents that the offensive was imminent.
How will battle unfold? By Michael Knights, Washington Institute for Near East Policy
What can be said with certainty is that the liberation of Mosul will be a multi-phased operation.
First the logistical base for the operation must be established at Qayyarah airbase. This is also the collecting point for the Iraqi forces that will liberate Mosul.
The next phase will be a multi-pronged advance on the outskirts of Mosul. This phase will unfold in fits and spurts: one day 10 miles will be gained easily, another day there will be tough fighting at an IS strongpoint or a pause to bring up supplies.
During November and December the main battle will likely begin. But for the Iraqi and coalition forces the issue of civilians will be a tricky factor.
The UN under-secretary for humanitarian affairs and emergency relief coordinator, Stephen O'Brien, asked for civilians to be protected and be given access to assistance "they are entitled to and deserve".
"I am extremely concerned for the safety of up to 1.5 million people living in Mosul who may be impacted," he said in statement.
Media captionMosul diary: 'I feel like I'm living in a prison'
As many as one million people could be forced to flee their homes because of the operation, he added.
There are no firm figures on how many people remain in Mosul, but there were more than two million there when IS took it more than two years ago.