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 and Epstein could be seen lightheartedly discussing women and a forthcoming meeting with Russian Foreign Minister Sergei Lavrov.

Later in the conversation, Epstein can be seen imploring Lajčák to ask Lavrov to get him a t-shirt featuring Lavrov and Vitaly Churkin, a Russian ambassador to the UN who had died the previous year.

Lajčák initially denied discussing women with Epstein when the files were released on Friday, according to Slovak media. He later reportedly said he had decided to resign to avoid damaging Fico politically.

Fico characterised the outrage in Slovakia over Lajčák's association with Epstein as 'an attack against me'.

Lajčák had served in four Slovak governments, three led by Fico, and as an international diplomat. The massive tranche of files released has revealed new details about relationships Epstein had with high-profile figures, including Elon Musk and Bill Gates.