ON JULY 28th Benigno “Noynoy” Aquino, the Philippines’ president, delivered his fifth—and, because presidents are constitutionally limited to a single six-year term, his penultimate—State of the Nation address. It was upbeat and boosterish, as such speeches usually are, punctuated with impressive-sounding numbers and less-impressive doses of false humility (when a politician tells his constituents, “You are our bosses,” he usually thinks nothing of the sort).

Towards the end of the peroration, however, came a grouse: “We have had to suspend a number of projects to make certain that we remain in accordance with the Supreme Court’s decision on the Disbursement Acceleration Programme, or DAP. I know that those of you in this hall are one with me in believing that we must not deprive our countrymen of benefits.” Stoking public resentment toward the Supreme Court risks becoming a habit of Mr Aquino’s. This speech marked his second attempt in as many weeks.

In both cases, the cause was the court’s 13-0 ruling that Mr Aquino’s DAP was unconstitutional. The programme was designed to speed the Philippines’ slow and inefficient government spending. It ran from the last quarter of 2011 to the first of 2013, and financed programmes and projects worth 144 billion pesos ($3.3 billion). In a nationally televised speech on July 14th, Mr Aquino insisted that the funds “were used for the benefit of Filipinos. And not for later, not soon, but now.”

Nobody contests that claim. Even the ruling concedes that “the DAP yielded undeniably positive results that enhanced the economic welfare of the country.” The problem was not what the money was spent on, but where it came from: mainly unreleased appropriations, funds reassigned from slow-moving to more urgent projects, and “unprogrammed funds” (ie, standby amounts to be released when revenue collections exceed targets).

Mr Aquino’s government defined those funds as savings. The Philippine constitution allows the president to “augment any item in the general appropriations law…from savings in other items”, bypassing the usual appropriations process.

The Supreme Court was unimpressed. It held that the DAP funds were not actually savings, so the president exceeded his constitutional authority in disbursing them. The court found that the DAP disbursals need not be undone, because beneficiaries accepted in good faith that the DAP was legal, but that the presumption of good faith does not apply to the programme’s “authors, proponents and implementers…unless there are concrete findings of good faith in their favour”. Mr Aquino has filed a motion for reconsideration, but given that the Supreme Court ruled unanimously against him, it is hard to see such a petition succeeding.

So far two impeachment complaints stemming from the DAP ruling have been filed against Mr Aquino. Both have been endorsed by members of the House of Representatives, so the House justice committee is now bound to consider them.

Since the court released its DAP ruling the president’s popularity has taken a tumble. The DAP controversy only came to light after the programme was alleged to be the source of the 50m pesos that Jinggoy Estrada claimed he and other senators were offered as an incentive to vote to convict a former Supreme Court justice. Mr Estrada was implicated in a scandal involving another fund called PDAF (Priority Development Assistance Fund), which the Supreme Court declared unconstitutional last year. The way the DAP was revealed may remind some voters that Mr Aquino was slower to condemn the graft stemming from PDAF than an anti-corruption president should have been.

The danger to Mr Aquino and the Philippines is less that he will be impeached or removed from office—his majorities in both legislative chambers will prevent that—than that his spat with the judiciary deepens, becoming a drag on his last two years in office. “We do not want two equal branches of government to go head to head,” said Mr Aquino in his July 14th speech. But neither does he seem anxious to take himself out of the ring.