The national security adviser to Slovakia's prime minister has resigned after documents released by the US showed he exchanged messages about girls and diplomacy with the late sex offender Jeffrey Epstein.

Robert Fico announced he had accepted Miroslav Lajčák's departure in a video message on Saturday, describing the adviser as an incredible source of experience in diplomacy and foreign policy.

The resignation comes a day after three million files relating to the influential financier were released by the US Department of Justice.

While the files do not show any wrongdoing on the part of those featured, including Lajčák, they have raised renewed questions for those who associated with Epstein.

In a text exchange from October 2018 - when Lajčák was serving as Slovakia's foreign minister - Lajčák humorously discussed women and a forthcoming meeting with Russian Foreign Minister Sergei Lavrov.

After Epstein sent an image, Lajčák replied: Why don't you invite me for these games? I would take the 'MI' girl.

Epstein texted back, saying, You can have them both, I am not possessive. And their sisters. This alarming exchange continued, revealing a troubling banter between Epstein and Lajčák.

Later, Lajčák sought Epstein's assistance for a female film producer's Oscar candidacy, demonstrating the nature of his communications with the financier.

Lajčák initially denied discussing women with Epstein when the files were released but later stated he decided to resign to avoid politically damaging consequences for Fico.

Fico decried the criticism of Lajčák as hypocritical, pointing to the complexities of the situation. Lajčák has richly contributed to Slovak diplomacy across multiple administrations, making this fallout particularly significant.

With renewed focus on Epstein's connections to many prominent figures, Lajčák's resignation underscores the ongoing ramifications of past associations with the disgraced financier.