President Trump is right to strengthen border security to deter smugglers and stanch the flow of illegal ­migrants. But that is only half of the solution. The other half is to stem the “push factors” that ­impel people, mainly Central Americans, to make the perilous journey north in the first place.

The crisis is real. In dramatic congressional testimony this week, Homeland Security Secretary Kirstjen Nielsen gave harrowing details of the catastrophe at our southern frontier.

“Smugglers and traffickers have caught on that outdated laws, lack of resources and bad court decisions effectively give them a free ticket into America,” she said. “As a result, the flow of families and children has ­become a flood” -- a 620 percent increase over the past five years in the number of families, or those posing as families, ­arrested at the border.

BORDER SECURITY MATTERS -- SENATE REPUBLICANS MUST NOT GO SOUTH ON TRUMP'S NATIONAL EMERGENCY DECLARATION

The smugglers exploit women and children -- and ­often rape them along the way. “This is not a manufactured crisis,” she concluded. “This is truly an emergency.” She was right. Even so, the Trump administration needs to do more to understand why billions of dollars in American aid have failed to stanch migrant outflows from the major source countries -- Guatemala, Honduras and El Salvador.

TO KEEP READING IN THE NEW YORK POST, CLICK HERE.

José Cárdenas served in the George W. Bush administration, focusing on Latin America and the Caribbean.