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.

After Epstein sent an image, which cannot be seen in the record, Lajčák replies: Why don't you invite me for these games? I would take the 'MI' girl.

Who wouldn't, Epstein texts back. You can have them both, I am not possessive. And their sisters.

Later on 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.

You get the tee shirt. Then you get the girls, Epstein writes, to which Lajčák agrees.

Additionally, in an email to Epstein in November 2017, Lajčák asks Epstein to assist a female film producer in getting her movie shortlisted for the Oscars.

Lajčák initially denied discussing women with Epstein when the files were released on Friday. However, he later reportedly stated that he decided to resign to avoid damaging Fico politically.

Fico characterized the outrage in Slovakia over Lajčák's association with Epstein as an attack against me and expressed his astonishment over the hypocrisy of the criticism.

Lajčák had served in four Slovak governments, three led by Fico, and held significant international diplomatic roles, including being an EU special representative for the western Balkans.

The released files also unveiled new relationships Epstein had with various high-profile figures, including Elon Musk, Lord Peter Mandelson, Bill Gates, and Andrew Mountbatten-Windsor.