"Operation underway... many migrants saved. At least 40 dead," the navy said on Twitter, while the Corriere della Sera newspaper said those who died were found in the hold of the vessel.
The boat, which was intercepted south of the Italian island of Lampedusa, was carrying around 300 people, the paper said.
An Italian navy helicopter spotted the boat, which was "overcrowded and starting to sink", about 21 miles off the Libyan coast, said a reporter with Italy RaiNews television at the rescue operation headquarters.
An Italian navy vessel was sent to its aid at 7am local time (5am GMT) and when its sailors boarded the vessel the grim discovery was made.
Massimo Tozzi, commander of the rescue patrol, told the Italian news agency AGI that 319 people had been saved, including a dozen women and several children.
"We were faced with a very emotional scene," he told the agency, describing how some bodies were floating on the water.
Survivors of the hazardous crossing from Libya often tell of how traffickers lock migrants in the hold -- mostly black Africans - who pay less for the voyage.
Packed inside the confined space they not only risk drowning if the rickety boats capsize, but many are also overcome by diesel fumes.
The EU says the scale of migration, driven by war, disaster and poverty, has no parallel since the 1940s.
"The world finds itself facing the worst refugee crisis since the Second World War," EU Migration Commissioner Dimitris Avramopoulos said on Friday.
Italy and Greece have born the brunt of the emergency.
On the Greek island of Kos, scores of exhausted migrants, many of whom arrived on inflatable boats early Saturday, were turned away from a ferry that was due to start registering new arrivals
"We don't know where to go. We were told we could no longer register at the stadium" where Greek authorities were registering new arrivals this week, said Sleiman, a Syrian refugee among those gathering near the ferry in the morning.
"We are in a vicious cycle, and we keep turning round and round," he said.
UN refugee agency spokeswoman Stella Nanou said it was unclear whether registration on the ferry would begin later in the day, as authorities had announced on Friday.
Nanou also said the EU must show more "solidarity" with Greece as it struggles to handle the migrant crisis.
"For example, solidarity in terms of financial support to Greece, solidarity in terms of technical support, and solidarity in terms also of creating more legal ways for those people to reach Europe," she told AFP.
Still, hundreds of people who had registered could be seen leaving the Greek resort island on Saturday on a ferry to Athens.
But after the precarious boat trip to Kos and sleeping rough on the streets, a young Syrian man, Anas, who is travelling to Athens with his daughter, feared more hardship was to come.
"We managed to escape drowning but now we don't know what is going to happen. We came to Europe but honestly, it's all fear, it's all danger and nothing is working," said Anas, who declined to give his second name.
Earlier this week, there were some 7,000 refugees and migrants on Kos, but that number has fallen to some 2,500, according to Greek police.
More than 101,700 migrants have arrived on Italy's shores since the start of the year, with at least 2,040 others dying on the crossing, according to the latest figures issued by the International Organization for Migration (IOM).
To deal with the crisis the EU is fast-tracking 2.7 million euros ($3 million) to debt-wracked Greece, which will also receive 30 million euros from a total fund of 2.4 billion euros created for all 28 EU member states to cope with migrants until 2020.