Court president Nawaf Salam (C) arrives for the two-day hearing
Court president Nawaf Salam (C) arrives for the two-day hearing AFP

Ecuador's early April raid on Mexico's embassy to seize a former top Ecuadoran official crossed a line and set a dangerous precedent for global diplomatic relations, the UN's top court heard on Tuesday.

Ecuadoran security forces stormed the Mexican embassy in a late night raid on April 5 to arrest former vice president Jorge Glas, who is wanted on corruption charges and had been granted asylum by Mexico.

"There are lines in international law which should not be crossed," Mexico's representative told judges at the International Court of Justice.

"Regrettably, Ecuador has crossed that line," Alejandro Celorio Alcantara told the Hague-based court, where Mexico filed a case against Quito.

Quito's rare incursion on diplomatic territory sparked an international outcry, and led Mexico to break ties with Ecuador and pull its diplomats out of the country.

On Tuesday, Celorio warned the raid by special police forces -- of which images were shown in the courtroom -- set a "disconcerting" precedent.

"At the core of this case lies not only the egregious transgression against Mexico, but also the legal certainty of every other sovereign state, international organisation and tribunal in that sacrosanct principle that governs the inviolability of diplomatic premises," said Celorio.

The operation "created a disconcerting precedent that resonates throughout the international community," he added.

"The forceful entry... into our embassy and the egregious attack against our diplomatic personnel has to have consequences," Celorio later told reporters on the steps outside the opulent Peace Palace, home of the ICJ.

Ecuadoran officials did not make a statement, but will address judges on Wednesday.

Lawyers and representatives from both countries will state their cases before the ICJ, which rules in disputes against countries.

Ecuador on Monday filed its own case against Mexico, accusing the Central American state of "blatantly abusing" its diplomatic mission to harbour Glas, which Quito considered a fugitive from the law.

Shortly after the raid, Mexico applied to the ICJ to hand down a number of emergency measures to protect its embassy and diplomats.

In its application Mexico also asked the court to "suspend Ecuador as a member of the United Nations" until it issues a public apology "recognising its violations to the fundamental principles and norms of international law".

It also wants judges to declare that the ICJ was the "appropriate judicial body" to determine a state's "responsibility... in order to initiate a process of expulsion" from the UN.

Mexico based its application on the principles of the UN Charter as well as the 1948 Pact of Bogota -- which obliges its signatories to solve disputes through peaceful means -- and the 1961 Vienna Convention which guarantees protection for diplomatic staff.

While the ICJ may take several months or even years to hand down a final ruling, Mexico has asked for a set of emergency "provisional measures".

This included "immediate measures" to protect its embassy and diplomatic premises in Quito and to "allow the Mexican government to clear diplomatic premises and the private residence of diplomatic agents."

Ecuadoran President Daniel Noboa has defended the embassy raid as necessary to detain Glas because he posed a flight risk, saying he was willing to "resolve any difference" with Mexico.

But Ecuador's own National Court of Justice ruled just over two weeks ago that Glas' arrest was "illegal and arbitrary".

The high court however announced that Glas would remain behind bars pending criminal investigation.

Lawyers for Glas are seeking his freedom after filing a writ to the court and seeking that his detention be declared illegal.

Glas, who served as vice president from 2013 to 2017, faces graft charges stemming from his time in office.

The raid came hours after Mexico granted Glas' request for political asylum.

Ecuador has refused to recognise Glas's asylum status, saying it was not legal to grant it in cases of common crimes.

Following his arrest, Glas was hospitalised due to what officials said was the 54-year-old's refusal to eat in prison, where he was later returned.

Several Latin American states, Spain, the European Union, United States and the UN chief have condemned the embassy intrusion.

Glas, who served as vice president from 2013 to 2017, faces graft charges stemming from his time in office
Glas, who served as vice president from 2013 to 2017, faces graft charges stemming from his time in office AFP