The newly-elected Dutch parliament has approved a motion demanding a general pardon for thousands of failed asylum seekers who arrived before 2001
The vote is seen as a reprimand to the outgoing centre-right government, which had ordered them to be expelled.
It is a sign of the shift in Dutch politics from the right to the centre.
Political parties in the Netherlands are still trying to form a governing coalition, after elections last week failed to produce an outright winner.
The slim majority - 75 in favour of a general pardon and 74 against - came in the parliament's first session since the 22 November general elections.
The outgoing government had ordered the expulsion of 26,000 rejected asylum seekers.
Prime Minister Jan Peter Balkenende's Christian Democrats won the most seats in the elections and he is expected to form a new government.
But his coalition with the Liberal Party does not have enough support for its tough immigration policies.
Immigration Minister Rita Verdonk said allowing rejected asylum seekers to stay would be an invitation for immigrants to come to the Netherlands.
The outgoing cabinet faces an unusual political dilemma. If the right-wing immigration minister snubs the motion for an amnesty she could face a no-confidence motion from the left.
Verdonk more popular than Rutte
New Dutch parliament orders Cabinet to pardon thousands of rejected asylum-seekers