President Trump thanks Miami-Dade mayor for dropping county’s “sanctuary” protections.

President Donald Trump issued a late-night tweet Wednesday thanking Miami-Dade’s mayor for a January decision to drop the county’s “sanctuary” protections for immigration offenders, praising Carlos Gimenez “for following the RULE OF LAW!”

It was the second time Trump used a tweet to praise Gimenez, a Cuban-born Republican who backed Hillary Clinton last fall. The latest presidential tweet came at the end of a day that saw Trump attorney general Jeff Sessions visit Miami to personally thank Gimenez for his January decision to drop a 2013 county policy that had Miami-Dade declining requests from immigration officers to hold people booked on local charges while being sought for deportation.

Gimenez distanced himself from Trump hours before the event, which drew no other elected officials and a condemnation from a county commissioner who called the attorney general’s visit “offensive.” Early Wednesday, Gimenez issued a statement calling it “very disappointing” that Trump walked back an unqualified condemnation of white supremacists in Charlottesville, Va., after the president said there were some “very fine people” there to protest the removal of a Robert E. Lee statue, as well.

Trump’s 10:55 p.m. tweet reinforces Gimenez’s status as the mayor drawing notable attention from the president. A search of Trump’s presidential Twitter feed shows he used the word “mayor” shows he has only named two people holding that office. The first was on Jan. 26, when Gimenez first reversed Miami-Dade’s sanctuary protections and Trump declared the move “Strong!” in a tweet. Then came two denunciations of London Mayor Sadiq Khan in June for reassuring comments after a terrorist attack there ( “Pathetic”).

Though he broke with Trump in the fall while seeking reelection to a second four-year term, Gimenez soon renewed a relationship with the real estate mogul who owns one of Miami-Dade’s largest hotels. Trump golfed with Gimenez twice while eying a takeover of the county’s Crandon Park golf course, and negotiated a takeover deal that ended up fizzling in 2015 in the face of opposition by county commissioners.

Trump phoned Gimenez as president-elect after Fidel Castro’s death in November, and Gimenez attended Trump’s inauguration. When Gimenez announced Miami-Dade would begin accepting immigration detainer requests, he justified the move in part by pointing to billions of dollars in federal aid he hoped the county could win from the Trump administration for expanding rail service.

The policy change sparked fury in Miami-Dade, with critics accusing Gimenez of betraying Miami’s tradition of supporting immigrants. But the county commission backed Gimenez’s policy by a 9 to 3 vote in February, the Sessions speech at PortMiami drew only a modest protest on Wednesday.

Under the 2013 policy, Miami-Dade jails could only honor detention requests for serious offenders. Even then, the policy required the detention requests to be ignored if Washington had not already agreed to pay for the extra detention time — a rule that all but barred the requests, since Immigration and Customs Enforcement consistently refused reimbursements.

The detention requests affect people booked on local criminal charges, brought to a county jail, and fingerprinted. If those prints match someone on a federal immigration-offender database, a detainer request gets triggered. The request asks the county to hold the person an extra 48 hours, plus holidays and weekends, to give immigration officers extra time to apprehend the person for possible deportation.

Gimenez ordered Miami-Dade to start accepting the detainers on Jan. 26, a day after Trump issued his own directive that federal agencies withhold funds from “sanctuary” communities. Miami-Dade was labeled a sanctuary jurisdiction under the Obama administration, but on Wednesday Sessions declared the county in “full compliance” and eligible for federal grants. Earlier in the month, Sessions’ Justice Department made a similar declaration and notified Miami-Dade it would continue receiving a $500,000 police grant.

Chicago and other sanctuary cities are suing the Trump administration to protect their federal funds while declining to cooperate on immigration enforcement, calling the president’s threat illegal. Miami-Dade’s new sanctuary policy also faces court fights, including from a U.S. citizen who claims he was illegally held by a county jail after he was free to go on local charges but left behind bars under the direction of immigration officers.

In his tweet, Trump positioned the immigration crackdown as a way to fight crime. “Sanctuary cities make our country LESS SAFE!”