KYIV - Ukraine could export 60 million tonnes of grain in eight to nine months if its ports were not blockaded, but Russia's strike on the port of Odesa showed it will definitely not be that easy, an economic adviser to the Ukrainian president said on Sunday.

Ukraine could earn $10 billion by selling 20 million tonnes of grain in silos and 40 million tonnes from its new harvest, adviser Oleh Ustenko said. The harvest totals 60 million tonnes, of which 20 million are for domestic consumption, he said.

"If the ports were unblocked now and we say we need to move 60 million tonnes of grain... then we would transport 60 million tonnes of grain within eight-nine months," he said.

"But with the way they are opening now and what Russia is doing in the Black Sea, yesterday's strike shows that it definitely won't work that way," he said.

Russian missiles hit the port of Odesa a day after Russia and Ukraine, with mediation by the United Nations and Turkey, signed a deal to reopen Black Sea ports and resume grain exports. Moscow says it hit military infrastructure.

The deal is expected to ease global food shortages caused by the war.

Ukraine will need 20 to 24 months to export those volumes if its ports are not functioning properly, he said.

(Reporting by Natalia Zinets; writing by Tom Balmforth; Editing by Hugh Lawson)