3. Where a ship fails to comply with the obligation set out in Article 24 for two or more consecutive reporting periods, and where other enforcement measures have failed to ensure compliance with this Regulation, the competent authority of the Member State of the port of call may, in respect of a ship not flying the flag of that Member State and after giving the opportunity to the company concerned to submit its observations, issue an expulsion order. Where the competent authority of the Member State of the port of call decides to issue an expulsion order, it shall notify that order to the Commission, the other Member States and the flag State concerned through the FuelEU database. Every Member State, with the exception of the Member State whose flag the ship is flying, shall refuse entry of the ship which is subject to the expulsion order into any of its ports until the company fulfils its obligations. Where a ship fails to comply with the obligation set out in Article 24 for two or more consecutive reporting periods and enters into a port of the Member State whose flag it flies, the Member State concerned shall, while that ship is in one of its ports, after giving the opportunity to the company concerned to submit its observations, order a flag detention until the company fulfils its obligations.