The Education (Admissions to Schools) Bill 2016 passed all stages in the Dáil last night and will now be sent to the Seanad.
Under the new legislation, over-subscribed primary schools will not be allowed to discriminate on the basis of religion, and minority religions will be offered more protection.
Minister for Education Richard Bruton thanked TDs for their co-operation.
Fianna Fáil Education Spokesperson Thomas Byrne said it was a major piece of legislation.
"It is in some ways radical legislation but in other ways will not affect most schools," he added.
He welcomed that provisions for gaelscoileanna will be debated in the Seanad.
Last night's debate was delayed for a time as a group of rural independent TDs called votes on most amendments.