More than 76,000 migrants crossed the southern border illegally last month, the highest number in 12 years. So much for all those media “fact checks” arguing that there’s no emergency to justify President Trump’s wall.

Immigration officials say the number is only going to increase, creating what Customs and Border Protection Commissioner Kevin McAleenan warns is “a border security and a humanitarian crisis.”

Why are they coming in such vast numbers? Because smugglers have put them wise to how to take advantage of recent court decisions to claim asylum and remain here indefinitely.

They’re coming (mainly from Guatemala) in ever-larger groups, mostly families as opposed to individuals. They’ve been told that if they cross the border illegally, they only need cry “asylum.” And adults traveling with children have a better chance to stay.

Trump wants a wall to prevent that “one foot on American soil” rule. But what’s really needed is a change to our perverse asylum rules — which will take both political cooperation and compromise.

Consider: Officials say the biggest “pull factors” for migrant families are court settlements that not only bar deportations without lengthy proceedings, but also prevent the detainment of families for more than 20 days.

After that period, families must be allowed to settle here while their cases wind their way through immigration court.

In other words, once they make it across the border, we can’t reject them and we can’t hold them. That situation, McAleenan warns, is “unsustainable.”

Congress needs to step up and update laws written long before today’s dilemma surfaced. But doing it means not letting the exclusionist and open-borders extremes stand in the way of practical solutions.

Lawmakers hate Trump’s “national emergency” effort to build The Wall, but it’s their job to offer a better long-term solution.