Hungary has decided to build a temporary fence on the border with Serbia "as fast as possible" to stop the flow of illegal migrants.
Foreign Minister Peter Szijjarto said that several laws needed to be amended before construction could begin, but he did not say when the work on the border could start.
Mr Szijjarto said the fence, which is opposed by Serbia, "is not a bilateral issue. Relations with Serbia have never been as good as now".
He said 61,000 illegal immigrants had entered Hungary this year, nearly all by crossing Hungary's southern border with Serbia.
Most of those who request refugee status in Hungary quickly leave for other destinations in western Europe, like Austria, Germany and Sweden.