People hoping to settle in the United States wait years for a green card to be legal residents. They play by the rules. Yet these law-abiding newcomers must feel like idiots, watching what’s happening on the southern border.

Hundreds of thousands of Central American migrants are walking right in. They’re not waiting in line. They’re using “asylum” requests as their E-ZPass. Just 12 percent of requests from El Salvadorans, 11 percent from Guatemalans and 7.5 percent from Hondurans are actually granted, according to the Department of Homeland Security. Never mind, the request gets them in the door.

It’s a shameful distortion of a program intended to provide a haven for true victims of state-sponsored religious, ethnic and political persecution. The United States offered asylum to Hungarian anti-Communists after their uprising was crushed by the Soviets in 1956; to Cubans fleeing Castro’s prisons; to Vietnamese after the fall of Saigon in 1975; to Chinese political dissidents escaping the crackdown after Tiananmen Square in 1989; and, more recently, to Chinese Christians and Muslims threatened for practicing their religion.

That’s not what’s happening on the southern border. There, migrants walk up to a border agent with a familiar story. Women typically plead they’re victims of an abusive boyfriend or husband, and men claim they’re escaping gang violence. They’re detained briefly, but many are then released into the United States and given a date for an asylum hearing.

Being granted asylum means hitting the jackpot. Asylees get access to the Refugee Cash Assistance program, including medical care, a housing allowance and hundreds of dollars a month in cash. In contrast, immigrants who go the green-card route are ineligible for most benefits for years.

Half of those who use asylum as their excuse for crossing the border never even file a claim or show up at a hearing. They’re also winners. After all, they made it inside, unlike the East Asian waiting 12 years to enter as a legal worker.

Last weekend, open-borders advocates held 700 marches across the country, protesting the Trump administration’s policies. One target was Attorney General Jeff Sessions’ recent clarification that domestic abuse is not sufficient grounds for seeking asylum. A few immigration judges have granted asylum on those grounds, but it’s not how asylum is defined.

House Democratic Leader Nancy Pelosi accused Sessions of “staggering cruelty.” But Sessions is right. The asylum law “is not a general hardship statute,” he says. If every hardship qualifies for asylum, it means everyone can come in.

That’s the marchers’ objective — and increasingly the goal of the progressive flank of the Democratic Party. Their rhetoric suggests any limit on immigration is a crime against humanity. New Yorkers like Sen. Kirsten Gillibrand, Gov. Andrew Cuomo foe Cynthia Nixon and Alexandria Ocasio-Cortez, who toppled Rep. Joe Crowley last week, are calling for the abolition of the Immigration and Customs Enforcement Agency.

A similar battle is raging inside the European Union, which is overwhelmed by mostly bogus asylum claims from North African migrants. More than 70 percent of their claims are rejected, according to special envoy of the UN High Commission on Refugees Vincent Cochetel.

But the migrants who are turned down for asylum stay, eluding deportation. They’re straining public schools and government benefits and provoking a backlash against German Chancellor Angela Merkel’s government. Last weekend EU leaders tentatively devised a plan to screen asylum seekers in disembarkation centers along the North African coast, before they make their way across the Mediterranean to Europe. President Trump is proposing something similar to vet asylum applicants on the Mexican side of our southern border, before they enter the US.

In America and Europe, demagogues tell us to have a heart and let everybody in. But the public understands that immigration affects public schools, wages, taxes — even cultural identity. That’s why we have immigration laws.

The aspiring Americans who obey those laws and wait their turn deserve our respect. Allowing other immigrants to jump in front of them using flimsy asylum claims is a slap in the face.

Betsy McCaughey is a senior fellow at the London Center for Policy Research.