An Indonesian woman accused in the killing of Kim Jong Nam, the estranged half-brother of North Korea's leader, in Malaysia in 2017 was released Monday after the country's prosecutors withdrew the murder charge against her.

Siti Aisyah, 27, one of two women implicated in the sensational murder of Kim, hugged her co-defendant, 30-year-old Vietnamese national Doan Thi Huong, and cried upon hearing the announcement at the High Court.

"I feel happy," a visibly moved Aisyah told reporters after she was released from detention for the first time since her arrest days after the Feb. 13, 2017, murder. "I didn't expect it."

She later left the court on the outskirts of Kuala Lumpur by car for the Indonesian Embassy in Kuala Lumpur, where she attended a press conference with Indonesian Minister for Law and Human Rights Yasonna Laoly.

Afterward, she flew to Jakarta, telling reporters after arriving at the airport that she was treated well in prison and thanking the Indonesian president and Cabinet ministers for their efforts to win her release.

"I hope our government will always be great, and may God protect President Jokowi and Vice President Jusuf Kalla," she said.

When handing Aisyah over to her family, Foreign Minister Retno Marsudi said the government worked to ensure she received a fair trial.

Huong remains on trial at the court in Shah Alam and is set to give her first testimony in the coming days.

(Siti Aisyah meets the press after being released from detention.)

Lead prosecutor Mohamad Iskandar Ahmad, in asking the court to drop the charge against Aisyah, said the prosecution was "directed" to do so but did not say why the country's attorney general decided on the move.

He later told Kyodo News that there were "representations" made on her behalf, and that "the decision was made based on the merits of those representations."

An Indonesian Foreign Ministry official told a news conference in Jakarta that Aisyah's release, more than two years after her arrest, was the result of sustained efforts by the Indonesian government to save her from the death penalty, which she would have faced if convicted.

Judge Azmi Ariffin of the High Court agreed with the prosecutors' request to drop the charge. However, he ruled that Aisyah be discharged, not acquitted, on the grounds that the court had already seen the prosecution present sufficient evidence to enable a verdict against the accused unless it is rebutted.

At a news conference at the embassy, Indonesian Minister for Law and Human Rights Laoly said that his office had written to Malaysian Attorney General Tommy Thomas to reconsider the charges against Aisyah.

In the letter, a copy of which was provided to the press, the office contended that Aisyah was misled into thinking that she had been performing for a reality show and she had no intention of killing Kim Jong Nam.

The office also claimed she had not been aware that she was being used as an "intelligence tool" of North Korea and that she did not benefit from the act.

The attorney general replied in a letter dated Friday, a copy of which was also provided at the news conference, that Malaysia decided to release the defendant after "taking into account the good relations between our respective countries."

After Aisyah was released, Huong, who remained alone in the dock, told Kyodo News through a translator during a break that she was happy for her. But given she was not discharged, Huong said, "I am upset. My mind is blank right now. I don't know what to think. I am in shock."

Her lead counsel Hisyam Teh Poh Teik slammed the prosecutors' move as "unfair" to his client given that the court found in an earlier stage of their trial that the prosecution had established a prima facie case against both women.

"We are upset," he told reporters, adding his team will call for the attorney general to reconsider the charge against Huong.

Huong was supposed to give her testimony from Monday until Thursday, but the court was adjourned until Thursday to allow her counsel to appeal her case to the attorney general.

The women were charged with killing North Korean leader Kim Jong Un's paternal half-brother by smearing the highly toxic nerve agent VX on his face at Kuala Lumpur International Airport.

In their trial, which began in October 2017, the women pleaded not guilty, with their defense counsel contending that North Korean agents had orchestrated the attack and that the women were mere scapegoats who thought they were hired to take part in prank videos.

The prosecutors alleged that the women had a "common intention" with four North Koreans to murder Kim Jong Nam, but the four -- Ri Ji Hyon, Ri Jae Nam, Hong Song Hac and O Jong Gil -- fled Malaysia within hours of the incident and are believed to have returned to North Korea.

In August last year, the High Court judge determined that the prosecution had established a prima facie case against the women based on the testimony of 34 witnesses and airport security camera footage, and ordered them to mount a defense against what he said was a "well-planned conspiracy" hatched with the four North Korean suspects.