President Trump announced Friday that Guatemala would agree to restrict asylum applications to the US from Central America — a win for his effort to stem the tide of illegal immigrants at the Mexican border.

The “safe third country” agreement would require migrants, including Salvadorans and Hondurans, who cross into Guatemala on their way to the US to apply for protections in that country instead of at the southern border.

It could potentially ease the crush of migrants overwhelming the immigration system and hand Trump a victory as he works to fulfill his campaign promises to curb illegal entry.

“This is a very big day. We have long been working with Guatemala and now we can do it the right way,” he said at the White House. “This landmark agreement will put the coyotes and smugglers out of business.”

The announcement came after a federal judge court in California blocked Trump’s most restrictive asylum effort to date, one that would effectively end protections at the southern border.

The two countries had been negotiating an agreement for months, and Trump threatened Wednesday to place tariffs on Guatemala if it didn’t cut a deal.

The president also said the US would strike back at France’s new tax targeting American tech companies — possibly by slapping tariffs on French wine, which he said wasn’t as good as American wine anyway.

“France just put a digital tax on our great American technology companies. If anybody taxes them, it should be their home Country, the USA. We will announce a substantial reciprocal action on Macron’s foolishness shortly. I’ve always said American wine is better than French wine!” he tweeted.

The president, a noted teetotaller, extolled the virtues of American vintners. “I’ve always liked American wines better than French wines. Even though I don’t drink wine. I just like the way they look,” he said from the Oval Office.

The 3 percent tax passed in France this month will affect firms such as Facebook and Google that earn $28 million from providing digital services there.

Trump also said he wasn’t concerned about North Korea’s missile tests this week because they’re just “short-range” and “my relationship is very good with Chairman Kim.”

The president also excoriated Democrats after House Speaker Nancy Pelosi and Rep. Jerry Nadler said they would continue investigating him.

“Democrats are clowns!” he declared. “We want to find out what happened with the last Democrat president. Let’s look into Obama the way they have looked at me from day one. They looked into everything that we’ve done. They could look into the book deal that President Obama made. Let’s subpoena all of his records.”

And he defended his weekend trips to his gold club in Bedminister, NJ, insisting he was working, not on vacation. He said he preferred Bedminister to weekending at Trump Tower because he did not want to create gridlock in Midtown — and the air conditioning on the White House was on the fritz.

With Wires