The New Jersey Legislature approved legislation on Thursday that would allow students without legal immigration status to pay in-state college tuition. Gov. Chris Christie planned to sign it on Friday, a spokesman said.

The bill’s passage was assured after Mr. Christie, a Republican, struck a deal with Democratic lawmakers, who agreed to a demand of his that they change the bill to remove a provision allowing undocumented immigrants access to state financial aid programs.

“This is what compromise looks like,” the governor said at a news conference in Trenton after the accord was revealed.

The legislation, commonly known as the Dream Act, had become a political wedge between the state’s large immigrant population and Mr. Christie, who has long tried to balance the sometimes-conflicting demands of being the chief executive of a liberal-leaning state while also gathering support for a possible Republican presidential candidacy.