UNITED NATIONS, July 18 (Reuters) - There are a "number of ideas being floated" to help get Ukrainian and Russian grain and fertilizer to global markets after Moscow quit a deal allowing the safe Black Sea export of Ukraine grain, the United Nations said on Tuesday.

The Black Sea deal was brokered by the U.N. and Turkey in July last year to combat a global food crisis worsened by Russia's February 2022 invasion of Ukraine. Ukraine and Russia are among the world's top grain exporters.

Russia's withdrawal on Monday, which included revoking its guarantees for safe navigation, also ended a pact between the United Nations and Moscow in which U.N. officials agreed to help Russian food and fertilizer exports reach world markets.

However, U.N. Secretary-General Antonio Guterres "will continue to explore all possible avenues to ensure that Ukrainian grain, Russian grain, Russian fertilizer are out on the global market," U.N. spokesman Stephane Dujarric said.

"There are a number of ideas being being floated," he told reporters, without giving details.

Ukraine's Foreign Minister Dmytro Kuleba said an alternative to the Black Sea grain deal had to be found and "there are very active discussions now." He said the export of Ukrainian grain through Europe would not be able to "compensate for the absence of deliveries from Ukrainian ports on the Black Sea."

Kuleba said the focus on reviving Black Sea shipments was either to continue within the existing framework or create a new model, but added: "The problem, of course, is what is going to happen if Russia decides to attack a vessel carrying grain."

"We have to take risks and we have to demonstrate that we can carry on without Russia," he told reporters on Tuesday during a visit to the United Nations.

(Reporting by Michelle Nichols; Editing by Tim Ahmann, William Maclean)