It’s fair to infer that Marco Rubio does not like Donald Trump very much. During the 2016 GOP primary, the Florida senator whom Trump mocked as “Little Marco” and “#RobotRubio” described the eventual nominee as a “con artist” who had “spent a career sticking it to working people” and was too “erratic” to be trusted with the U.S. nuclear codes. That’s when he wasn’t mocking how much makeup Trump wore or suggesting that Trump peed his pants on stage.

Since Trump came into office, Rubio, like many other Trump critics, has changed his tune. He now aggressively defends Trump on a range of issues including the investigation into his campaign’s ties with Russia, his crusade to build a wall on the U.S.-Mexico border, and his administration’s child-separation policy.

Some may see this about-face as mere spinelessness on Rubio’s part, but the U.S. response to events in Venezuela over the past week makes clear that the senator has not come away empty-handed. Few senators are as focused on Latin America policy as Rubio, particularly U.S. policy toward Cuba, where his parents are from, and its client state and ideological ally Venezuela. And the senator has managed to carve out a uniquely influential role in this area. Beyond immigration issues, Trump expressed little interest in Latin America during his candidacy and even voiced some mild support for Barack Obama’s diplomatic opening with Cuba. But as president, he has rolled back much of that opening and taken an unexpectedly hard line against Nicolás Maduro’s government in Venezuela. This started early on: The New Yorker has reported that after taking office, Trump “offered his N.S.C. staff little guidance on Cuba, except to ‘make Rubio happy.’ ” (From Trump’s point of view, this may have less to do with Rubio’s own state of mind than the policy preferences of the Cuban American voters and growing population of Venezuelan American voters he represents in Florida.) And veteran Latin America watchers noted that the president appeared to have “outsourced” his Venezuela policy to the senator. A key moment in the evolution of that policy, reportedly, was a 2017 Oval Office meeting organized at the last minute by Rubio between Trump and Lilian Tintori, the wife of imprisoned Venezuelan opposition leader Leopoldo López. Shortly after the meeting, Trump, who is not typically known for his strong advocacy of human rights and democracy abroad, called on Maduro to release political prisoners and began ramping up sanctions pressure on senior Venezuelan officials.

Rubio’s path parallels that of another hawkish Trump critic turned confidant: Sen. Lindsey Graham.

It was reportedly Rubio, along with Vice President Mike Pence, who urged Trump to recognize Venezuelan opposition leader Juan Guaidó as the country’s legitimate president last week. According to the Washington Post, he and fellow Floridian Rep. Mario Diaz-Balart have been “huddling with White House officials … to hammer out Latin American policies.” At times, he’s appeared to be slightly ahead of White House policy, such as when he declared on Twitter last week that U.S. diplomats should ignore an order from Maduro to leave the country, shortly before Secretary of State Mike Pompeo turned that argument into a directive. Rubio has seemed careful not to take too much credit. According to the Post, the president needed little encouragement to take his stand, but it’s hard to imagine this would be as much of a priority without Rubio’s prodding.

Whatever the senator thinks of Trump in private, the current U.S. policy on Venezuela is basically what we might expect from a Rubio administration. That probably would not have been the case if Rubio had spent the past two years sparring with Trump on Twitter and cable news.

(Judging by Rubio’s blunt public comments over the weekend urging Trump not to declare a state of emergency to build the southern border wall, he may feel he has the president’s ear on other key decisions as well.)

As the Miami Herald noted this week, Rubio’s path parallels that of another hawkish Trump critic turned confidant: Sen. Lindsey Graham. Graham’s 180-degree pivot from Trump critic to one of his closest confidants and one of his most influential foreign policy advisers has been even more dramatic than Rubio’s, so dramatic that critics have charged that he’s been “compromised” somehow. But Graham is rather open about the (plausible) reasons why he’s tried to get close to Trump: He wants to be in the room when Trump is making decisions, particularly on matters of national security. “This is why I play golf” with him, Graham said at the American Enterprise Institute last year. “President Trump has really got a lot of hard decisions to make.” When asked on CNN after the death of his close friend John McCain how he squares that friendship with his new relationship with a president McCain loathed, Graham said, “If you know anything about me, I want to be relevant. I want to make sure that this president, Donald Trump, who I didn’t vote for, ran against, is successful.”

Graham has tried to cash in on that relevance to persuade Trump to maintain large deployments of U.S. troops overseas to fight terrorism and put pressure on Iran. He’s had less success than Rubio at bringing Trump around to his worldview—probably because Trump cares more about bringing U.S. troops home than he does about Venezuela—but he hasn’t entirely failed, either. After Trump’s initial announcement in December that he was ordering the withdrawal of U.S. troops from Syria, Graham was quick to head down Pennsylvania Avenue for a meeting and left with confidence that Trump would only remove troops once they were able to “finish the job” of defeating ISIS. Graham’s statement was one of the earliest indications that the Syria withdrawal was going to be a gradual process without a fixed timetable, as has proved to be the case.

Likewise, on Afghanistan, Graham has told CNN that he sees his personal quest as “trying to convince President Trump [that] our presence here is homeland security in another fashion,” comparable to building a wall on the border. From Graham’s point of view, his quest may become only more critical as U.S. negotiators seek a cease-fire deal with the Taliban that could lead to a troop pullout.

In short, it’s rational, if not admirable, for former Trump critics within the GOP to avoid direct confrontation with Trump. Particularly with a president who is impulsive and often ill-informed, sucking up can win them a leading role in setting policy on the issues they care about the most.