Less than a week ago, Mayor Bill de Blasio was offering aid to Ecuadorians after the earthquake there. Now a political earthquake is rocking City Hall and the mayor is the one who needs help.

The report from the state Board of Elections that accuses him and his team of “willful and flagrant” violations of campaign finance laws immediately changes everything.

The veneer of business-as-usual is shredded. Never again can de Blasio wave off questions about the mushrooming investigations of his administration. As revelations pile up day after day, allies will desert him and the Putz will find himself a very lonely man.

There is no way to sugarcoat the facts: De Blasio is in trouble. Maybe very big trouble.

His City Hall is being depicted as the seat of a criminal enterprise. And so far, he offers nothing resembling a convincing ­denial.

As bad as it is, the election report covering the 2014 state Senate races is just the start. The endgame involves the more ­lethal issue of whether de Blasio sold government favors to donors. That is what federal prosecutors are looking for, and I believe they will find a mother lode.

Yet if the election report were all there is, it would still be a problem. It calls one of the campaign violations a possible felony and refers its findings to Manhattan District Attorney Cyrus Vance Jr. for prosecution. That explains why Vance recently partnered up with US Attorney Preet Bharara in the multipronged probe, effectively doubling the number of prosecutors and investigators.

And that gets to the heart of de Blasio’s vulnerability. His 2014 Senate effort wasn’t unique. It is just one example of how he has done business since the day he won the election in 2013.

Think of it as de Blasio’s Big Idea. While denouncing income inequality, he was determined to harvest big bucks from unions and private firms that had business before the city, and then to use that money to carry out his “progressive agenda.”

He raised as much as $40 million and deposited it in various slush funds he formed, including the Campaign for One New York, which he started before he even took the oath of office.

The money would be managed by a small team of insiders. Some were on the city payroll, but most were in favored law firms, public relations and consultant shops. In effect, de Blasio outsourced a permanent political operation to be the vanguard of his administration.

The money would come from real estate developers, yellow-taxi medallion owners, teachers unions and anybody else willing to play ball in hopes the mayor would ­return the favors.

Oh, and one more thing: De Blasio would do much of the fundraising himself, meeting with donors in large groups or ­one on one.

That is exactly the pattern he used in trying to help Democrats take back the state Senate in 2014. “The entire fundraising and campaign operation was run from City Hall by de Blasio staff in coordination with unions and Campaign for One New York officers and political consultants,” wrote Risa Sugarman, chief enforcement officer of the state Board of Elections.

She reports that some of the big checks that found their way into small upstate county political committees contained the words “donation per Mayor.”

Even before her findings were released, there were reports of new subpoenas being issued and a grand jury hearing testimony. That suggests that the probes are well beyond the preliminary stage and that prosecutors are confident crimes have been committed.

It is almost impossible to believe that de Blasio will emerge unscathed. Though he is notoriously uninterested in policy ­details, he has been fully engaged in politics and all the deals and transactions.

The mayor’s 3 strikes:

It can be no comfort to him that Bharara, who brought down former Albany kingpins Sheldon Silver and Dean Skelos, is on the case. If the mayor knows a good ­defense lawyer, he ought to hire him ­immediately.

My belief, based on what we know so far, is that the money de Blasio raised in large amounts was fungible. It was moved from fund to fund and distributed according to the mayor’s instructions. I also believe many donors didn’t care about the specific issues they ostensibly were contributing to, only that they wanted to please the mayor.

One notorious example could be NYCLASS, the group that spent nearly $1 million to defeat de Blasio rival Christine Quinn in the 2013 Democratic primary. Its leaders, Steven Nislick and Wendy Neu, wanted to ban carriage horses, and when de Blasio promised he would after Quinn refused, a barrage of ads against Quinn helped demolish her. Some of the ad money came from odd sources that had no direct interest in the horses, only in de Blasio’s success.

But even as mayor he has been unable to shut down the horse-carriage industry — despite extraordinary efforts that included a proposal to spend $25 million in taxpayer money to put the horses in Central Park. During negotiations, Nislick and Neu said they met with de Blasio and approved his proposal. And don’t forget the huge raise the mayor approved for the City Council while its members considered his plan.

The access of NYCLASS, which received a subpoena, is the kind that money buys. It becomes illegal when there is a quid pro quo.

If de Blasio’s operation has committed crimes, New York is on the verge of a crisis unique in modern times.

The largest corruption scandal to rock City Hall in our era occurred in Ed Koch’s third term, which began in 1986. It, too, had many tentacles, from the old Board of Estimate to the Parking Violations Bureau to real estate deals and patronage.

Queens Borough President Donald Manes committed suicide, political bosses like Stanley Friedman went to prison and a tarnished Bess Myerson won acquittal ­after a sensational trial.

Yet Koch was never charged or implicated in any crime and went on to finish the term with solid accomplishments, though he did lose the next election.

The current mayor should be so lucky.