Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Guatemalan judge has issued an unprecedented order to detain President Otto Perez Molina in a fraud scandal that has engulfed his government, dealing the most serious blow yet to entrenched political corruption in the Central American country.

The order is not for arrest, but for Perez Molina to declare before Judge Miguel Angel Galvea, who granted the request Wednesday from Attorney General Thelma Aldana, she told Canal Antigua television.

The president will have to appear on accusations of illicit association, fraud and receiving bribe money in a customs fraud scandal that has already led to the jailing of his vice president and the resignation of some Cabinet ministers.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Based on Perez Molina's testimony, the judge could decide to strip the president of his post, jail him or leave him in his position and free during the judicial process.

Guatemala's President Otto Perez Molina acknowledges reporters at the end of a press conference, in Guatemala City on Aug. 31, 2015. Guatemala's attorney general said Wednesday, Sep. 2, 2015, that a judge has granted her request for an order to detain President Otto Perez Molina in connection with a government corruption case that has thrown the country into turmoil. Moises Castillo / AP

Perez Molina, 64, has maintained his innocence and vows to face the legal process. No formal charges have been filed, though Aldana said there is a preliminary investigation underway into the president's possible involvement in the fraud ring.

The president's attorney, Cesar Calderon, told The Associated Press that Perez Molina will appear voluntarily as soon as they have confirmed the order was issued.

It is the first time a sitting Guatemalan president has faced legal prosecution, though several have faced corruption charges after leaving office.

Perez Molina is under an order not to leave the country, and on Tuesday congress lifted his immunity from prosecution.

The corruption scandal, uncovered by prosecutors and a U.N. commission probing criminal networks in Guatemala, involved a scheme known as "La Linea," or "The Line," in which businesspeople paid bribes to avoid import duties through the customs agency. The ring is believed to have defrauded the state of millions of dollars.

The scandal has already claimed the job of former Vice President Roxana Baldetti, whose ex-personal secretary was named as the alleged ringleader. Baldetti resigned May 8 and is currently in jail awaiting trial on accusations she took millions of dollars in bribes.