On a summer morning, FBI agents came knocking on lobbyist Jorge Forte’s door. He admitted that he and his longtime friend, Sweetwater Mayor Manuel Maroño, were splitting thousands of dollars in kickbacks in exchange for official favors.

Forte quickly agreed to cooperate in the FBI’s sting operation and arranged to meet the mayor in the lobbyist’s car outside city hall in early August. Forte, wearing a recording device, handed Maroño $5,000 in cash — a bribe from a sham Chicago company that had roped both men into a phony federal-grant scheme.

Forte’s flipping on his friend was revealed for the first time Wednesday, when the former political allies and business partners pleaded guilty to a corruption conspiracy charge in Fort Lauderdale federal court. The honest-services fraud charge accused them of illegally splitting $60,000 in cash and checks for official favors and concealing those payments from the public.

Maroño, 41, who had served as Sweetwater’s mayor for the past decade, faces at least three years in prison at a Jan. 23 sentencing hearing. But Forte, also 41, is likely to receive a much lower sentence because he was not a public official and, more significantly, he helped the feds seal their case against the now-suspended Sweetwater mayor.

Their demise as movers and shakers in local politics — Maroño was also close to Gov. Rick Scott — reverberated throughout Miami-Dade County.

U.S. District Judge William Zloch, known for requiring full confessions from defendants when they plead guilty, asked Maroño: “How did you get involved in this? Why did you do this?"

“I did this for personal benefit,” Maroño succinctly told the judge, betraying no emotion.

Later, outside the courthouse, Maroño apologized for his corrupt actions and thanked supporters in Sweetwater.

“The city is bigger than one person,’’ he said, standing with his defense attorneys, former federal prosecutors Kendall Coffey and Armando Rosquete. “The city needs to move on.”

By comparison, Forte seemed more remorseful as he choked up in the courtroom during his confession. He elaborated on splitting kickbacks in exchange for the mayor’s official support of the city’s bogus federal grant applications — meant only to enrich them.

Forte admitted he played the role of a bag man for the mayor. He also said Maroño lied about his city’s grant applications when undercover FBI agents, posing as government auditors, conducted a phony survey asking the mayor about them.

“I accept full responsibility,” said Forte, standing with his defense lawyers, David Weinstein and Donald Bierman.

Federal authorities condemned the defendants’ crimes.

“I hope that today’s timely resolution and guilty plea will make others think twice before lining their pockets with the greed of corruption,” U.S. Attorney Wifredo Ferrer said in a statement.

“Corrupt officials — either elected or appointed — are on notice: if they breach the public’s trust through stealing or accepting bribes in the course of their official duties, they will be vigorously investigated,” said Michael Steinbach, special agent in charge of the FBI in Miami.

Two others facing similar kickback charges resulting from the same FBI sting operation are former Miami Lakes Mayor Michael Pizzi, 51, and lobbyist Richard Candia, 49, though both allegedly received far less money than Maroño and Forte.

Pizzi pleaded not guilty last month and faces trial in mid-December, though it could be delayed into the new year.

Candia, who flipped for federal investigators by assisting their undercover probe before Forte, is also expected to plead guilty to a corruption charge.

All four defendants, being prosecuted by Assistant U.S. Attorney Jared Dwyer, were arrested on successive days in August in connection with two corruption cases.

According to initial criminal complaints, the two mayors and two lobbyists accepted thousands of dollars in bribes in exchange for championing purported federal grant applications for their towns. But in reality, the men were in cahoots to enrich themselves, according to FBI affidavits filed with the complaints.

Many of their conversations were recorded by undercover agents and on phone taps.

The two corruption cases, which started in 2011 with a confidential tip from a local lobbyist who worked as an informant for the FBI, shook up the political establishment in South Florida.

Initially, FBI agents arrested Pizzi and Maroño at their offices on charges of conspiring to commit extortion in their roles as elected officials between 2011 and 2013. Pizzi also was charged with the same misconduct linked to a purported federal grant for Medley, where he also served as the town attorney.

Both were ordered by a magistrate judge not to contact dozens of other politicians, officials or lobbyists, who are potential witnesses.

Also arrested one day after the mayors on the same initial charges were Forte, the former chief of staff for Maroño in Sweetwater, and Candia, a former lobbyist with the Becker & Poliakoff law firm.

The undercover agents used Candia to approach Maroño and Pizzi, pitching them on the idea of making easy money by using a fictitious Chicago business to tap into an actual government agency, AmeriCorps, which doles out federal grants.

Maroño worked with both lobbyists to break the law. Maroño and Forte received $40,000 for their parts in the federal grant scheme and an additional $20,000 for making introductions to other public officials on behalf of undercover FBI agents posing as operators of the Chicago grant business. Maroño used his contacts as president of the League of Cities in 2012.

The agents purported to operate a grant-writing business, Sunshine Universal, with access to federal grant money for economic development to create jobs. To lure in the mayor and Forte, the agents told both that Sunshine Universal needed their support for a $200,000 federal grant to study economic activity in Sweetwater, and that another $1.2 million grant for the city would be in store.

Maroño not only sponsored resolutions, but also wrote letters endorsing Sunshine Universal and answered purported audit surveys about the grants.

As part of their pleas, Maroño and Forte must each return $30,000 in kickbacks to the U.S. attorney’s office.