In less than a year, Sen. Jeff Flake (R-Ariz.) is headed for the exits. As he showed on Wednesday, he does not plan to go quietly.

The retiring Arizona Republican and outspoken critic of President Trump nearly thwarted Rep. Jim Bridenstine’s nomination to be administrator of NASA — casting a pivotal “no” vote before later changing to “yes” and allowing Bridenstine (R-Okla.) to advance by the slimmest of margins.

Afterward, Flake did not say much. He acknowledged he was negotiating for something.

“Just a few discussions,” Flake replied, when asked why he changed his vote.

Did he get any assurances?

“We’ll see,” he said. In Flake’s telling, it was “just a vote that stayed open a little longer than usual” because “some discussions needed extra time.”

Sen. John Cornyn (Tex.), the second-ranking Republican senator, said Flake wanted to talk to secretary of state nominee Mike Pompeo about travel restrictions to Cuba.

“He has got an issue he wants to talk to [CIA] Director Pompeo about, and he was looking for some assurances that he would have that opportunity,” Cornyn said. “I’m confident he’ll have that chance this afternoon.”

A longtime advocate of opening up relations with Cuba and a champion of free trade, Flake flew to the Caribbean nation at then-President Barack Obama’s request to help relaunch diplomatic relations in 2014.

Trump has taken a harder line toward Cuba than Obama. When he announced last year he was once again tightening travel restrictions, Flake promptly criticized the move.

Senate Republican leaders are operating with almost no margin for error these days. They hold a 51-49 majority, which has been even narrower lately as Sen. John McCain (R-Ariz.) battles a serious form of brain cancer at home in Arizona.

When it comes to Pompeo, Flake has considerable leverage for a rank-and-file senator. He sits on the Senate Foreign Relations Committee that will have to decide whether to favorably recommend Pompeo’s nomination to the full Senate. In a vote on the Senate floor, Flake’s position could be important, depending on how many Democrats oppose Trump’s pick to be the nation’s top diplomat.

Over the past couple of years, Flake has been one of the most outspoken critics of Trump in his party — taking on both the president’s tone and the substance of his policy decisions. He is retiring from the Senate at the end of this year and is therefore not reliant on the good will of the administration and party leaders to help him get reelected.

It remains to be seen whether Flake will get what he wants, on a number of fronts. He has also been pushing for a vote to help protect young undocumented immigrants. So far, the Senate has not passed such a bill.

If Wednesday is any indication, he is going use the leverage he has in a nearly evenly divided Senate to keep trying.