SPRINGFIELD — Education Secretary Betsy DeVos was campaigning against states regulating student-loan companies when she called her friend, Gov. Bruce Rauner, in August 2017.

Two weeks later, the Republican governor vetoed legislation creating protections for students taking out federal loans.

In language that echoes President Donald Trump’s education chief in her continuing crusade against state intervention, Rauner, who’s considered one of the nation’s more vulnerable incumbents in November, declared in his veto message that the measure “encroaches on the federal government’s responsibilities.”

The Aug. 10, 2017, phone call, which appears on both officials’ appointment calendars reviewed by The Associated Press, underscores the interaction the first-term governor has with Trump while publicly trying to distance himself from a president who is hugely unpopular in Democratic Illinois.

Lawmakers reversed Rauner’s veto, with wide GOP support in the House on a pro-student education bill. The “Student Loan Bill of Rights,” which takes effect at the end of this year, requires companies that administer the programs to properly process payments, tell borrowers about debt forgiveness because of disability or problems with the schools they attended and to provide experts to explain all repayment options.

DeVos continues to oppose involvement from outside the federal government.

“Gov. Rauner and his administration work closely with the Trump administration, as we did with the Obama administration, when it’s good and right for Illinois,” Rauner spokeswoman Patty Schuh said.

But Rauner has famously been reluctant to even use Trump’s name, despite withering criticism. His opponent, Democrat J.B. Pritzker, just released an ad that features a television reporter repeatedly asking Rauner about Trump, only to be chided by Rauner to “focus” on issues affecting Illinois.

“Ninety percent of Americans find it really easy to have an opinion about Donald Trump, but Bruce Rauner doesn’t,” said Sen. Daniel Biss, an Evanston Democrat who sponsored the student loan legislation and ran unsuccessfully for the Democratic gubernatorial nomination. “He can’t seem to figure it out.

“He works with Trump but he doesn’t mention his name. He praises his [Trump’s] staff but criticizes his comments. His attempt to be all things to all people is painfully transparent and it’s not working.”

Rauner championed Trump’s selection of DeVos, who shares Rauner’s affinity for public-school choice and similar education priorities and his calendar shows he called her on the day before her January 2017 Senate confirmation hearings were to begin.

More recently, the White House issued a statement that quoted Rauner’s high marks for Trump’s nomination of Brett Kavanaugh for the Supreme Court.

Rauner took time out in June for a Washington visit with Transportation Secretary Elaine Chao to accept a $132 million railroad congestion-relief grant for Chicago. The Chicago Tribune reported in May that he requested smog-rules relief for suburban Chicago from Trump’s Environmental Protection Agency at the time it was relaxing standards for Wisconsin to aid the development of the Foxconn Technology Group factory.

In July, he introduced Vice President Mike Pence at a Rosemont appearance as among the “greatest leaders in American history” and credited Trump’s tax cuts for a “roaring” economy.

To the dismay of health-care advocates, Rauner vetoed legislation in August that would regulate short-term health insurance plans, which have expanded under a Trump administration rule change.

Critics say the plans are advertised as cheaper than those that comply with the Affordable Care Act, but offer diminished coverage for people with pre-existing conditions.

If Rauner’s been bolder and more open in his embrace of Trump recently, look no further than the GOP primary last spring, said Nick Kachiroubas, a DePaul University political scientist. His three-percentage-point survival of Wheaton Rep. Jeanne Ives’ challenge from the right prompted Rauner overtures to conservatives to “bring them back,” Kachiroubas said.

“He and his team know that he needs all the conservative support as well as a huge faction of the moderates’ support in order to win,” Kachiroubas said. “He’s trying to balance those delicate objectives that don’t always see eye to eye.”

Rauner’s hot-and-cold relationship with the bombastic Trump isn’t “odd considering some of the things the president was doing,” said former Rep. Robert Pritchard, a Republican from Hinckley who resigned in July. Illinois needs its piece of the federal pie and “you want to play ball where you can play ball,” Pritchard said.

But Pritchard said Rauner’s behind-the-scenes dealing with Washington — such as the DeVos phone call — could explain some of the governor’s 11th hour requests for changes in legislation, or veto messages that raise new issues.

“He wasn’t engaged in a lot of our legislative conversations but then after the fact he’d want to do something different,” Pritchard said.

Kachiroubas said that Rauner’s dance with Trump is not unlike Pritzker’s steps with his patron, Democratic Party Chairman Michael J. Madigan of Chicago, who’s also the longest-serving speaker of a state House in U.S. history.

Rauner’s campaign attempts to link the Hyatt hotel chain heir to the “corruption” and machine politics Rauner claims is vintage Madigan.

“The dance is similar, but there are different people on both sides,” Kachiroubas said. “With Pritzker, it’s Madigan and how close they dance. With Rauner, it’s Trump and the Republican ideology.”