Rep. Alexandria Ocasio-Cortez’s two top staffers are leaving her Congressional office following a firestorm of controversy.

Her Chief of Staff Saikat Chakrabarti is done as of Friday.

Ocasio-Cortez’s Communications Director Corbin Trent plans to be her Congressional spokesman until the end of the month but will then transition to her 2020 campaign to play the same role.

Chakrabarti will head to New Consensus, a nonprofit climate change group that helps promote the Green New Deal.

The Intercept first reported the departures, which were confirmed by The Post Friday.

Chakrabarti and Trent’s aggressive tactics often made life harder for Ocasio-Cortez in Washington.

Chakrabarti helped spark the rift between Ocasio-Cortez and House Speaker Nancy Pelosi and others when he likened moderate Democrats to “new southern Democrats” in a tweet — in effect calling them racists.

He particularly targeted moderate Rep. Sharice Davids, a Democrat from a formerly red Kansas district who is one of the two Native American women serving in Congress.

Chakrabarti said Davids voted in a way that helped “enable a racist system” when she voted in favor of a bill that would provide southern border relief.

The tweet was deleted but the damage was done.

The remark was widely criticized and prompted a tweet from the @HouseDemocrats account: “Who is this guy and why is he explicitly singling out a Native American woman of color?”

Chakrabarti also regularly tweeted criticism of Pelosi, who sat down with Ocasio-Cortez last Friday to clear the air. In a closed-door caucus meeting, the speaker had urged the socially savvy freshman to stop tweeting about other House Dems.

In June, Trent also generated negative press for his boss when he dropped the F-bomb while calling out a potential Republican challenger on Twitter.

“Yo @RichValdes what in the actual f–k makes you think you’re entitled to a debate with AOC,” Trent tweeted. “Pro tip: stalking her at a parade ain’t gonna make it any more likely to happen.”

Both aides followed the New York Democrat to DC after working on her successful primary campaign — in which she toppled Rep. Joe Crowley — as the leaders of the Justice Democrats, an insurgent group that tried to oust Democratic incumbents and replace them with progressives more in line with Sen. Bernie Sanders.

The finances surrounding Justice Democrats have also generated bad press. The group attracted three Federal Election Commission complaints filed by conservative groups because of an odd setup in which money from the PAC flowed into two limited liability companies controlled by Chakrabarti.

Ocasio-Cortez didn’t require Chakrabarti nor Trent to disclose their personal finances. Members can designate any member of their staff a “principal assistant” forcing them to file forms annual financial disclosure forms.

Both Ocasio-Cortez and Trent painted a rosy picture of the departures.

Her office told the Intercept that the aides’ leaving was planned before the most recent dustup between AOC and other members of the so-called “Squad” and House leadership.

“Saikat has decided to leave the office of Rep. Ocasio-Cortez to work with New Consensus to further develop plans for a Green New Deal,” Trent said in a statement.

“We are extraordinarily grateful for his service to advance a bold agenda and improve the lives of the people in NY-14. From his co-founding of Justice Democrats to his work on the Ocasio-Cortez campaign and in her official office, Saikat’s goal has always been to do whatever he can to help the larger progressive movement, and we look forward to continuing working with him to do that.”

The congresswoman texted the Intercept saying that Trent was “shifting to our campaign side so we can work on some ambitious comms projects we’ve been looking forward to working on.”