LIMA, Peru — Peruvian President Pedro Pablo Kuczynski’s entire Cabinet was forced to resign following a no-confidence vote Friday by the opposition-led congress, throwing the country into political turmoil and forcing him to cancel a trip to the United Nations’ General Assembly.

Kuczynski was to have met with U.S. President Donald Trump, along with the presidents of Brazil and Colombia, during the trip to New York next week but must now stay in Peru to form a new Cabinet.

“I’ve had to cancel” the meetings, he said in an address to the nation.

The pre-dawn vote followed a heated debate in which lawmakers insulted Kuczynski’s prime minister and called for his education minister to resign due to her handling of a 60-day teachers’ strike.

Instead of ceding to the demand, Kuczynski requested a vote of confidence in his entire Cabinet, which he lost by a wide margin.

It was the first time under Peru’s 1993 constitution that the single-chamber legislature has taken such a step.

Kuczynski was defiant, saying on Twitter that “we won’t give in … for the sake for the children, for Peru and for governability.”

Under Peru’s constitution, he must replace his prime minister but can reappoint the other 18 members of his cabinet. If lawmakers do not ratify his picks, he would have the option of dissolving congress and calling new parliamentary elections.

The legislature is dominated by supporters of former presidential candidate Keiko Fujimori, who narrowly lost to Kuczynski in last year’s election. She is the daughter of former strongman Alberto Fujimori, who governed Peru for a decade until 2000.