After Congress voted to force the justice department to release its files on Jeffrey Epstein, the legislation will now move to President Donald Trump's desk.

And if Trump does sign it into law as expected, it will mark the final action in what has been a remarkable and abrupt change in his position.

For months, Trump was dismissive of calls to release the government's full trove of documents about the late financier and convicted sex offender. He described the case in July as "pretty boring stuff".

That was until Sunday, when - with a snowballing number of Republicans in the House signalling they would vote to release them - the president relented and encouraged them to do so. His shift opened the floodgates for an overwhelming 427-1 vote on Tuesday.

His reversal was a rare instance of Republican politicians pressuring Trump into action, and into a very public change in stance, rather than the other way around.