The former President of Venezuela and his wife are asking a judge to dismiss the U.S. government's drug-trafficking case against them. The request comes after a member of President Donald Trump's cabinet arrived in Venezuela to finalize a new oil deal with the country's acting president.

Attorneys for Venezuela's former president Nicolas Maduro and wife, Cilia Flores, are saying that they have something called "sovereign immunity."

In a 60-page document filled in a New York federal Court on Wednesday, lawyers wrote: "No American court has ever presided over the criminal trial of a foreign leader who was recognized by their own country as the sitting head of state at the time the charges were brought."

That point is key to the pair's argument. They are asking a judge to dismiss the drug-trafficking charges they currently face. The two are set to go on trial next year.

Since their capture by U.S. forces in January, they've been held in a New York City jail. Both have pleaded not guilty to the charges against them, which include allegations they conspired to move thousands of tons of cocaine into the U.S.

"He personally oversaw the vicious cartel known as Cartel de la Solis, which flooded our nation with lethal poison responsible for the deaths of countless Americans," President Donald Trump said in January.

Members of the Trump administration have argued that Maduro, as an authoritarian leader, was not a legitimate head of state at the time of his capture and that the trial against Maduro and his wife should proceed.

President Trump's energy secretary was in Venezuela on Wednesday to attend a signing ceremony solidifying a new oil deal.

Chevron is one of several countries that announced plans to expand operations in Venezuela. But concerns have been raised over interim president Delcy Rodriguez's authority to sign such a deal and skepticism it will bring down gas prices in the U.S. anytime soon.

"The production in Venezuela is growing every month,” Energy Secretary Chris Wright said Wednesday. “But to massively lower oil prices, that's a few-year prospect for sure."

Venezuela's constitution states arrangements like the ones reached Wednesday must be approved by the country's National Assembly. That has not happened.