When Ivanka Trump assembled a group of Republican senators at her tony Washington home last fall, the guest list included one particularly notable name. Sen. Dean Heller of Nevada had been publicly chided by President Donald Trump months earlier and had, at times, kept the president at arm's length.
But within weeks of dining with the president's daughter and adviser, Heller, who is up for re-election this year, was working closely with the White House, writing part of the Republican tax bill.
The tax collaboration was part of steady rapprochement between the swing-state senator and loyalty-loving president. Through a series of White House meetings and phone calls, a round trip on Air Force One, and work on multiple issues with Ivanka Trump, Heller has quietly mended an awkward relationship with the president.
The slow, careful warming is driven in part by political pragmatism. Heller is facing a primary challenger who has been quick to criticize the senator as insufficiently supportive of the president. An angry and meddling Trump could throw up additional hurdles.
But should he emerge from that fight, Heller - the only Republican senator seeking re-election in a state Democrat Hillary Clinton carried in the 2016 presidential election - must then face an electorate far less friendly toward the president.
The senator has not recanted his once sharp criticism of the 2016 Republican presidential nominee, but has found another way into the president's good graces. Deliberately and behind the scenes, he's shepherded a body of policy legislation to Trump's desk, and in doing so, made himself a Senate ally the president has promised to defend.
"His actions speak louder than words - on what he's accomplished with his agenda and the president's," said Nevada Republican Party Chairman Michael McDonald, a Heller friend whom Trump regularly consults. "It's a relationship between two men that has grown."
There was plenty of room to grow.
In late July, Trump publicly ribbed Heller at a White House meeting of GOP senators. With Heller to his immediate right, Trump motioned to the senator, who had recently held up the GOP's long-promised effort to repeal President Barack Obama's health care law, and declared he was "worried" about Heller and whether he was onboard. "You weren't there," he said. "But you're going to be. Look, he wants to remain a senator, doesn't he?"
Trump's lightheartedness masked frustration with Heller's opposition to the repeal legislation, which Heller argued would drop too many people from insurance coverage and do nothing to lower medical costs.
The tension was not shocking given their history. During the campaign, Heller renounced Trump as someone who "denigrates human beings" and suggested he wouldn't vote for him. (He later said he did.)
In light of their past disagreement, Heller notified the White House in late July, just days after the White House event, that he intended to vote to allow a health care debate to continue. And in September, Heller was part of the team, with South Carolina Sen. Lindsey Graham and Louisiana Sen. John Kennedy, to devise a last-ditch, ultimately unsuccessful effort to dismantle the Obama-era law.
Since the summer, Heller and Trump or senior White House staff have spoken regularly, chiefly on a range of policy including taxes and veterans issues. Stylistically, the two are near opposites: Heller, the quiet listener from rural Nevada who enjoys horseback riding, and Trump, the flamboyant, back-slapper from New Yorker. They've come to see in one another a get-it-done approach to policy that has fueled a respectful working relationship, McDonald said.
The senator declined to be interviewed for this story.
Heller was quick to jump on a plane to Washington in order to ride aboard Air Force One with Trump back to Nevada after the deadly mass shooting in Las Vegas in October.
Heller also has endeared himself to Trump by working closely with his daughter. Ivanka Trump and Heller, with several other Republican senators, now are studying paid family leave policy.
Heller's election path is eased by the thaw with Trump but is by no means clear. He still faces Republican primary opponent Danny Tarkanian, who entered the race in August accusing Heller of forsaking Trump.
At the same time, Heller has had to answer for Trump's proclivity for controversy.
On a constituent conference call last month, a woman asked why Heller supported Trump in light of his alleged profanity about African nations.
Trump is going to be president for the next three years, Heller replied. "I believe I have an obligation as a representative from the state of Nevada to work with every president."
In Washington this month, Trump asked McDonald, the state GOP chairman, how Heller was doing. He specifically asked when the Nevada primary was scheduled.
"I said, 'He's doing very good, sir,'" McDonald said. "He said, 'I'll be out (to Nevada) before the primary.'"