Slovakia's government has barred the Hungarian president from making a controversial visit.
President Laszlo Solyom had planned to visit a part of Slovakia with a large ethnic Hungarian population, to unveil a statue of the first Hungarian king.
Prime Minister Robert Fico said the plans were a provocation.
Bilateral relations have long been strained over Slovakia's treatment of its ethnic Hungarians, who make up about 10% of the population.
Mr Solyom had been due to attend the unveiling of a statue of the mediaeval Hungarian king, Saint Stephen, in the southern town of Komarno, on the River Danube which separates the two countries.
But Prime Minister Fico said any visit would be a "violation of international law and Slovakia's sovereignty".
At a news briefing on the bridge where he was turned back to Hungary, Mr Solyom said it was an "unofficial visit" as he had been invited by a civil organisation.
But Slovakia's Foreign Minister Miroslav Lajcak told the BBC that no Slovak officials had been invited to the event, and that the visit came as Slovaks marked the anniversary of the 1968 invasion of the country by five armies, including Hungary's.
"We communicated to him through diplomatic channels that it would be much better if we do the same action, but on a different day, and with the presence of Slovak dignitaries, particularly the Slovak president, which was ignored," Mr Lajcak told the BBC's World Tonight programme.
He said repeated public appeals were made to President Solyom to reconsider the timing and circumstances of his visit.
"This was definitely the last resort that could have been avoided," he added.