Italy says it's reached a deal with the archipelago after the ship has been stranded for five days after rescuing people off the coast of Libya