A Brexit supporter has admitted staging a protest which disrupted services out of St Pancras on the day the UK was due to leave the EU.
Terry Maher, from Camden, north London, caused eight Eurostar services to be cancelled during a 12 hour stand-off with police that began on Friday night.
Westminster Magistrates' Court heard the 44-year-old told police he was angry with politicians over Brexit.
He was remanded in custody after he admitted causing a public nuisance.
The court was told Maher climbed on to a roof soon after 19:00 GMT claiming to be armed with a Stanley knife and was not brought down until the following morning.
A National Rail statement described the building that he scaled as a railway viaduct that crosses the high-speed lines just outside St Pancras.
As well as halting Eurostar services, Southeastern Trains was forced to cancel 16 services and part-cancel 44 others. A further 28 services were also delayed.
Prosecutor Robert Simpson said Maher's actions caused delays for between 7,000 and 8,000 people.
"There was a total of 1,757 minutes of lost time as a result of it and the estimation is that there will be in excess of £40,000 in delay fines," he said.
The court heard that following his arrest, Maher had told police he "disliked politicians" because they were messing up Brexit.
He also made "various other comments about illegal immigrants in the country" and complained about foreign aid money being spent in India, Mr Simpson said.
District Judge Richard Blake said the protest was "very serious indeed" and had "cost many thousands of pounds".
"I should think untold members of the public had their weekends spoiled," he said.
Maher is next due to appear at Blackfriars Crown Court on 29 April in relation to a second charge under the Malicious Damage Act.