Sen. John McCain (R-AZ) vexed former FBI Director James Comey — and pretty much everyone on social media — on Thursday, with a line of questioning near the end of Comey’s testimony to the Senate Intelligence Committee.

McCain’s queries appeared to center on a distinction between outcomes of the concluded FBI investigation of former Secretary of State Hillary Clinton, whom the bureau declined to charge with crimes last year over her use of a private server for government emails, and its ongoing investigation into Russian efforts to influence the 2016 presidential election.

He seemed to be asking why the Clinton investigation was closed but the Russian investigation — which has grown to include questions about conduct by associates of President Donald Trump during the campaign — continues. But it’s hard to say for sure:

MCCAIN: Well, at least in the minds of this member, there's a whole lot of questions remaining about what went on, particularly considering the fact that as you mentioned, it's a “big deal” as to what went on during the campaign, so I'm glad you concluded that part of the investigation, but I think that the American people have a whole lot of questions out there, particularly since you just emphasized the role that Russia played. And obviously she was a candidate for president at the time. So she was clearly involved in this whole situation where fake news, as you just described it, is a big deal took place. You're going to have to help me out here. In other words, we're complete, the investigation of anything former Secretary Clinton had to do with the campaign is over and we don't have to worry about it anymore? COMEY: With respect to — I'm a little confused. With respect to Secretary Clinton, we investigated a criminal investigation with her use of a personal email server. MCCAIN: I understand. COMEY: That's the investigation I announced conclusion of on July 5th. MCCAIN: So at the same time you made the announcement there would be no further charges brought against then-Secretary Clinton for any activities involved in the Russia involvement and our engagement and our election. I don't quite understand how you can be done with that but not done with the whole investigation of their attempt to affect the out of come our election. COMEY: No. I'm sorry. We're not — at least when I left, when I was fired on May the 9th, it was still an open active investigation to understand the Russian efforts and whether any Americans worked with them.

At another point, McCain mistakenly used Comey’s name instead of President Trump, saying “So you reached a conclusion in the case of Mr. Comey President Comey -- excuse me — case of President Trump.”

McCain, 80, has served in the senate for 31 years. As he directed questions to Comey, several of his fellow senators seemed perplexed by what they were hearing.

Other senators' faces as McCain talks. pic.twitter.com/2x1nmRzbkQ — Emma Loop (@LoopEmma) June 8, 2017

Comey, too, seemed confused.

Online, reporters express concern about McCain’s behavior.

McCain appears to be saying there's a double standard because there is no ongoing investigation about Clinton and...Russia? — Maggie Haberman (@maggieNYT) June 8, 2017

I'm honestly confused with McCain's line of questioning. McCain wants to know if the Clinton camp colluded w/ Russians so they could lose? — Kyle Griffin (@kylegriffin1) June 8, 2017

does McCain genuinely not understand the Clinton email server investigation and the Russian interference investigation are different things? — Wesley Lowery (@WesleyLowery) June 8, 2017

McCain seems to be conflating the email investigation and the Russia investigation. — Jake Sherman (@JakeSherman) June 8, 2017

I am confused about what point McCain is trying to make here? — Chris Cillizza (@CillizzaCNN) June 8, 2017

What is wrong with John McCain? — Tom Ashbrook (@tomashbrooknpr) June 8, 2017

UPDATE: McCain released a statement Thursday afternoon clarifying some of his questions and joking that he stayed up late. He wrote:

“I get the sense from Twitter that my line of questioning today went over people’s heads... What I was trying to get at was whether Mr. Comey believes that any of his interactions with the President rise to the level of obstruction of justice. In the case of Secretary Clinton’s emails, Mr. Comey was willing to step beyond his role as an investigator and state his belief about what ‘no reasonable prosecutor’ would conclude about the evidence. I wanted Mr. Comey to apply the same approach to the key question surrounding his interactions with President Trump—whether or not the President’s conduct constitutes obstruction of justice. While I missed an opportunity in today’s hearing, I still believe this question is important, and I intend to submit it in writing to Mr. Comey for the record.”

Below is a rush transcript of McCain and Comey’s full exchange.

MCCAIN: In the case of Hillary Clinton, you made the statement that there wasn't sufficient evidence to bring a suit against her, although it had been very careless in their behavior, but you did reach a conclusion, in that case that it was not necessary to further pursue her, yet at the same time in the case of Mr. Comey you said that there was not enough information to make a conclusion. Tell me the difference between your conclusion as far as former secretary Clinton is concerned and Mr. Trump.

COMEY: The Clinton investigation was a completed investigation that the FBI had been deeply involved in, so I had an opportunity to understand all the facts and apply those facts against the law as I understood them. This investigation was under way. Still going when I was fired. So it's nowhere near in the same place.

MCCAIN: But it's still ongoing.

COMEY: Correct. So far as I know. It was when I left.

MCCAIN: That investigation was going on. This investigation is going on. You reached separate conclusions.

COMEY: No. That one was done.

MCCAIN: That investigation have any involvement of secretary Clinton or any of her associates is completed?

COMEY: Yes, as of July the 5th, the FBI completed its investigative work and that's what I was announcing, what we had done and what we had found.

MCCAIN: Well, at least in the minds of this member, there's a whole lot of questions remaining about what went on, particularly considering the fact that as you mentioned, it's a “big deal” as to what went on during the campaign, so I'm glad you concluded that part of the investigation, but I think that the American people have a whole lot of questions out there, particularly since you just emphasized the role that Russia played. And obviously she was a candidate for president at the time. So she was clearly involved in this whole situation where fake news, as you just described it, is a big deal took place. You're going to have to help me out here. In other words, we're complete, the investigation of anything former secretary Clinton had to do with the campaign is over and we don't have to worry about it anymore?

COMEY: With respect to -- I'm a little confused. With respect to secretary Clinton, we investigated a criminal investigation with her use of a personal e-mail server.

MCCAIN: I understand.

COMEY: That's the investigation I announced conclusion of on July 5th.

MCCAIN: So at the same time you made the announcement there would be no further charges brought against then-secretary Clinton for any activities involved in the Russia involvement and our engagement and our election. I don't quite understand how you can be done with that but not done with the whole investigation of their attempt to affect the out of come our election.

COMEY: No. I'm sorry. We're not -- at least when I left, when I was fired on May the 9th, it was still an open active investigation to understand the Russian efforts and whether any Americans worked with them.

MCCAIN: But you reached the conclusion that there was no reason to bring charges against secretary Clinton. So you reached a conclusion in the case of Mr. Comey President Comey -- excuse me—case of President Trump. You have an ongoing investigation. So you've got one candidate who you're done with and another candidate that you have a long way to go. Is that correct?

COMEY: I don't know how far the FBI has to go, but yes, the Clinton e-mail investigation was completed. The investigation of Russia's efforts in connection with the election and whether there was any coordination and if so with whom between Russia and the campaign was ongoing when I left.

MCCAIN: You just made it clear in what you said. This is a, “big deal.” I think it's hard to reconcile in one case you reach complete conclusion and the other side you have none. And there's a lot more there as you know, as you called it “a big deal.” She's one of the candidates. In her case you say there will be no charges but in the case of President Trump, the investigation continues. What has been brought out in this hearing is more and more emphasis on the Russian engagement and involvement in this campaign. How serious do you think this was?

COMEY: Very serious. But I want to say something to be clear. We have not announced and there was no predication to announce an investigation of whether the Russians had coordinated with secretary Clinton's campaign.

MCCAIN: They may not have been involved with her campaign but they were involved in the entire presidential campaign obviously.

COMEY: Of course. Yes, sir. And that is an investigation that began last summer and so far as I'm aware continues.

MCCAIN: So both President Trump and former candidate Clinton are both involved in the investigation, yet one of them, you said there's going to be no charges and the other one the investigation continues. Well, I think there's a double standard there to tell you the truth. Then when the President said to you, you talked about the April 11th phone call, and he said, “because I've been very loyal to you, very loyal, we had that thing, you know.” Did that arouse your curiosity as to what, “that thing” was?

COMEY: Yes.

MCCAIN: Why didn't you ask him?

COMEY: It didn't seem to me to be important for the conversation we were having to understand it. I took it to be some -- an effort to communicate to me that there is a relationship between us where I've been good to you, you should be good to me.

MCCAIN: But I would think it would intensely arouse my curiosity if the President of the United States said “we had that thing, you know.” I'd like to know what the hell “that thing” is, particularly if I'm the director of the FBI.

COMEY: Yeah. I get that, Senator. Honestly, I'll tell you what. This is speculation, but what I concluded at the time is in his memory he was searching back to our encounter at the dinner and was preparing himself to say I offered loyalty to you, you promised loyalty to me and all of a sudden his memory showed him that did not happen and I think he pulled up short. That's just a guess. A lot of conversations over the years.

MCCAIN: I think I would have had some curiosity if it had been about me to be honest with you. So are you aware of anything that would lead you to believe that the president or members of the administration or members of the campaign could potentially be used to coerce or blackmail the administration?

COMEY: That's a subject for investigation. Not something I can comment on sitting here.

MCCAIN: But you reached that conclusion as far as secretary Clinton was concerned, but you're not reaching a conclusion as far as this administration is concerned. Are you aware of anything that would lead you to believe could information exist that could coerce members of the administration or blackmail the administration?

COMEY: That's not a question I can answer, senator.