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, Lajčák and Epstein 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'.

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

Later on, Epstein implored 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 wrote, to which Lajčák agreed.

Lajčák initially denied discussing women with Epstein when the files were released, but later stated 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'.

'I have not seen so much hypocrisy in his criticism for a long time, and from all sides,' he said.

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 Epstein's relationships with high-profile figures, including Elon Musk, Bill Gates, and Andrew Mountbatten-Windsor.