CIA Director Mike Pompeo was pressed for his views on homosexuality Thursday during his confirmation hearing to be secretary of state.

Pompeo, a former Kansas congressman, said he would treat State Department employees fairly regardless of their sexual orientation if he's confirmed, but did not directly answer questions from Sen. Cory Booker, D-N.J., about whether he views homosexuality as a perversion.

"When I was a politician, I had a very clear view on whether it was appropriate for two same-sex persons to marry. I stand by that position," Pompeo said.

He added, "I believe it's the case we have married gay couples at the CIA. You should know I treated them with the exact same set of rights."

But Booker pressed further: "Do you believe gay sex is a perversion, yes or no? Yes or no, sir? Do you believe that gay sex is a perversion, because that's what you said here in one of your speeches. Yes or no, do you believe gay sex is a perversion?"

Pompeo responded that "my respect for every individual, regardless of their sexual orientation, is the same, and it will be so if I'm confirmed."

Booker said he remained concerned.

[Opinion: Cory Booker really wants to know how Mike Pompeo feels about gay sex]

"Your views do matter. You're going to be dealing with Muslim states on Muslim issues. And I do not necessarily concur that you are putting forward the values of our nation when you believe there are people in our country who are perverse," Booker said.