The captain of a ship flying the Italian flag must be an EU/EEA national.
"Art. 292-bis. (((Requirements for the performance of the duties of master and chief mate).))
((On board ships flying the Italian flag, the master and chief mate, if performing the duties of the master, must be citizens of a Member State of the European Union or of another State party to the Agreement on the Economic Area 300. Access to these functions is subject to the possession of a professional qualification and knowledge of the Italian language and legislation which allows the keeping of on-board documents and exercise of the public functions of which the commander is invested.
The professional qualification programs are determined by decree of the Minister of Infrastructure and Transport, as well as the competent body for carrying out the procedures for verifying the requirements referred to in the first paragraph.)))[...] (Navigation Code (ROYAL DECREE 30 March 1942, n. 327), last amended by DECREE-LAW 14 August 2020, n. 104, Article 292-bis [google translation])
Navigation Code (ROYAL DECREE 30 March 1942, n. 327), last amended by DECREE-LAW 14 August 2020, n. 104, Article 292-bis 
[<a href="http://www.normattiva.it/uri-res/N2Ls?urn:nir:stato:regio.decreto:1942-03-30;327!vig=2014-09-12">Code</a>]