Conservative journalist James O'Keefe released a surreptitiously recorded video in an attempt to prove that he is being targeted by the Department of Homeland Security after he wore an Osama bin Laden costume and snuck across the U.S. border to Mexico and then back into Texas in August 2014. (Project Veritas)

Conservative journalist James O’Keefe, known for targeting liberal groups and Democratic politicians, says he is now the one being targeted — by the Department of Homeland Security.

It all started in August 2014, when O’Keefe donned green fatigues and an Osama bin Laden costume and sneaked across the U.S. border to Mexico and then back into Texas, a stunt cited by Sen. John McCain (R-Ariz.) in congressional hearings. O’Keefe said in an interview Wednesday, that his point was to “show that our elected officials were lying to the American people” by saying the border is secure.

[James O’Keefe crosses border dressed as Osama bin Laden]

But he may have messed with the wrong bureaucrats, because the powerful DHS — the third-largest Cabinet department — controls border security. Ever since the bin Laden stunt, O’Keefe said, he has been stopped and questioned at length by U.S. Customs and Border Protection officers each of the five times he has tried to reenter the United States. The questions, he said, have been overly intrusive, covering his business operations, what his next investigative project will be and his political views.

“It is our contention that this is retaliation for our journalism along the Mexican border,” O’Keefe said. “It’s troubling that they are doing this to a citizen reporter. . . . These questions have nothing to do with national security or border issues or smuggling narcotics into the country. They are questions that they would never ask a Washington Post reporter, that they would never ask NBC News.”

To buttress his claims, O’Keefe did what he does best: He released a surreptitiously recorded video. The 9-minute-16-second production provides hints that DHS was not pleased by O’Keefe’s bin Laden venture but reveals no clear evidence that the agency is targeting him.

At one point, a Customs and Border Protection officer at the Montreal airport is heard asking O’Keefe on July 14: “Maybe you’ve passed the border before in a disguise? Or dressed as someone else? You’ve done that kind of stuff before?”

“So are they retaliating against me?” O’Keefe asks.

The officer firmly denies it. “No, we’re not retaliating against you. Why would you say that?” he says.

At another point, however, a different CBP officer tells O’Keefe that agency officials had put a “hit on you” to avoid getting “egg on their face, basically.”

The video does show officers asking O’Keefe a series of detailed questions about his business model, how his company makes money and his political opinions.

“What’s your next project?” one officer asks.

“I was so flabbergasted by the question, I couldn’t even form a coherent response,” O’Keefe says in the video.

An officer then asks O’Keefe whom he wants to win the Republican nomination for president and whether he would support businessman Donald Trump, who has fueled his political rise with outspoken comments about illegal immigrants.

[Donald Trump defends disparaging comments about illegal immigrants]

“I don’t really endorse politicians for, you know, anything,” O’Keefe responds.

In a statement late Wednesday, U.S. Customs and Border Protection rejected O’Keefe’s allegations of retaliation but said it could not comment on the specifics of his case, citing privacy concerns.

“CBP does not retaliate against applicants for entry into the United States,’’ the statement said, adding that travelers can be sent to additional, secondary screening based on a variety of factors, including security concerns, immigration violations and prior criminal convictions. The statement did not contest the video’s depictions of O’Keefe’s encounters with federal officers.

O’Keefe, who styles himself as a “guerrilla journalist,” made his name in conservative circles with controversial stings that in one instance appeared to show officials of a federally funded nonprofit that provided housing and other assistance to low-income people discussing prostitution and tax evasion. The ensuing scandal prompted Congress to strip funding from the group, ACORN, and led to its demise.

[James O’Keefe, associate, describe controversial ACORN videos]

In that case and others, O’Keefe was accused of selectively editing his videos. And his new release is not really a video at all: It consists mostly of audio recordings of the federal officers, with the Customs and Border Protection logo on the upper left part of the screen.

The reason, O’Keefe said in the interview, is that he could only record audio because the agents searched his phone. Even to do that, he said he had to “manufacture a special type of device that was recording, where they would have no idea.” He declined to describe the device or where it was hidden.

The recordings cover O’Keefe’s experience in Montreal — where he went through customs while on his way to New Jersey from Athens — and a similar experience in Seattle on July 25. In Seattle, he said he was interrogated by officers after returning from a cruise sponsored by National Review magazine.

O’Keefe says he did not record the questioning on the other trips in which he reentered the United States between December and June. He says he also was interrogated by officers in April at an airport during a trip to the Virgin Islands, a U.S. territory.

Asked why he is now taking on a powerful federal agency, O’Keefe said he felt compelled to go public by what he views as the drastic nature of the harassment, combined with the political timing.

“My entire purpose is to shock the conscience of the American people by exposing reality,” he said, adding: “I think immigration is a very timely topic right now. I could have continued recording more interactions, but sometimes your gut instinct is to package a story when you feel you have enough facts.”