The U.S. Justice Department on Thursday moved to dismiss its case against Michael Flynn, abruptly ending a prosecution in which the onetime Trump national security adviser twice pleaded guilty only to later seek to back out of his admission that he lied to federal agents.

In a court filing, the Justice Department said it has taken the view that Flynn's statements in a January 2017 interview, in which he was accused of lying about his past communications with Russia's ambassador to the United States, did not merit a criminal prosecution.

"The government is not persuaded that the January 24, 2017 interview was conducted with a legitimate investigative basis and therefore does not believe Mr. Flynn's statements were material even if untrue. Moreover, we do not believe that the government can prove either the relevant false statements or their materiality beyond a reasonable doubt," U.S. Attorney Timothy Shea, the only signatory, said in Thursday's filing.