Gov. Christie on Thursday vetoed legislation that would have prohibited the Port Authority of New York and New Jersey from assisting federal authorities in enforcing President Trump's travel ban.

The Port Authority owns and operates the New York metropolitan region's bridges, tunnels, and airports, including Newark Liberty International Airport.

Christie, a friend of Trump's, said that federal authorities needed access to such facilities to enforce the nation's immigration laws.

The U.S. Supreme Court, in an interim decision, last month permitted Trump to deny entry to certain categories of people from several majority-Muslim countries and said it would hear arguments on the ban in October.

"If this bill were to be enacted, Port Authority officials would be forced to make the untenable decision of whether or not to abide by the provisions of this bill and obstruct legitimate federal law enforcement actions," Christie, a Republican, wrote in his veto message.

"Advancing a bill that compels the Port Authority to violate state or federal law is the epitome of irresponsible governing," he added.

Beyond the travel ban, Christie added that "the approach to regulating immigration embodied in this bill, whereby individual states may individually set immigration policies, is unwise and contrary to the United States Constitution.

"Such an approach would quickly turn the uniform federal immigration laws into a patchwork of individual state preferences."

The Democratic-controlled Legislature passed the bill on largely party-line votes. Supporters argued that the state needed to take a stand against what they described as Trump's discriminatory executive order.

Even if Christie had signed the bill, it would have had to pass in New York as well to take effect.

Asked about the Supreme Court's decision, Christie told reporters last month, "My instinct is they probably did the right thing, because I think the president has pretty broad powers regarding policing immigration, from a statutory and constitutional perspective."

As a presidential candidate, Christie denounced Trump's call for a temporary ban on Muslims entering the U.S.

Christie later endorsed Trump and has mostly defended the president since then, though he blamed Trump's staff for the administration's botched introduction of its initial ban in January.