THE HAGUE (Reuters) -Judges at the International Court of Justice (ICJ) on Thursday rejected a demand by Mexico for emergency measures to protect its embassy in Ecuador, amid an ongoing diplomatic spat which has seen Mexico cut ties with the South American country.

Mexico and Ecuador have each filed lawsuits against each other at the ICJ, also known as the World Court, after the dramatic April arrest of Ecuador's former Vice President Jorge Glas, who had been living in the Mexican embassy in Quito since December.

Mexico has accused Ecuador of violating international law by breaching the embassy, while Ecuador accuses the North American country of illegally granting asylum to Glas, who has been convicted twice of corruption and is facing fresh charges.

Mexico had asked for emergency measures against Ecuador to ensure it would protect the embassy and the residences of Mexican diplomats.

ICJ presiding judge Nawaf Salam said in his ruling that Ecuador had already promised to protect Mexican diplomatic premises and therefore there was no urgency for additional orders by the court.

The court's rejection of Mexico's request "confirms the unnecessary character of the request," Ecuador's foreign ministry said in a statement after the ruling.

"The court recognizes that the good faith of Ecuador should be presumed and makes clear that the present circumstances do not present any risk to the rights of Mexico," the ministry added.

Final rulings on the cases could take years, and while ICJ rulings are legally binding, the tribunal has no means to enforce them.

An Ecuadorean court ruled later in April that although Glas' arrest was illegal, he must remain in jail due to his previous convictions. His legal team has pledged to appeal.

Glas is facing charges of misusing funds collected to aid reconstruction of coastal Manabi province after a devastating 2016 earthquake.

(Reporting by Stephanie van den Berg, additional reporting by Alexandra Valencia in Quito, Editing by Sharon Singleton)