The White House's top spokesperson had a warning for a CNN reporter on Tuesday: Ask President Trump a question at an event you're about to attend, and you may not be allowed into similar events.

The strange moment came before a presidential bill signing ceremony in the morning. Events like that often include what's known as a "pool spray," a brief opportunity for a small group of reporters and photographers to take photos and, when possible, ask questions. The White House "pool" is comprised of a few members of the press corps who are assigned on a rotating basis to cover presidential events and file reports to be used by other media outlets when it would be impractical for the entire press corps to attend those events. When journalists are on pool duty, they are working not just on behalf of themselves and their employers but for all the journalists and outlets that receive pool reports.

Related: Trump slams CNN International — and journalists fire back

On Tuesday, White House press secretary Sarah Sanders gave CNN White House correspondent Jim Acosta, who had drawn pool duty, an unusual warning.

Pose a question to Trump at the pool spray after the bill signing, Sanders told Acosta, and "I can't promise you will be allowed into a pool spray again."

Sanders did not immediately respond to a request for comment. Acosta said he was stunned by the interaction, which other pool reporters witnessed.

"I couldn't believe my ears," he said in an email. "She did not appear to be issuing the same warning to the other reporters in the pool."

Following the warning, Acosta said that Sanders asked if the two could speak off the record. Acosta declined and ultimately posed a question to Trump at the spray, asking the president about a suggestive tweet he directed at Sen. Kirsten Gillibrand. Trump did not respond.

Some of Acosta's colleagues in the White House press corps, like NBC News' Hallie Jackson, backed him after the event concluded.

"@POTUS doesn't have to answer questions," Jackson tweeted, "but we can sure ask them."

.@Acosta was at the bill signing as part of the rotating pool that reps all 5 tv networks. And to be clear: this is not how the pool works. @POTUS doesn't have to answer questions - but we can sure ask them. https://t.co/NmvLNlZn7Z — Hallie Jackson (@HallieJackson) December 12, 2017

In a statement, Margaret Talev, a senior White House correspondent for Bloomberg who is president of the White House Correspondents' Association, said, "It is longstanding practice for reporters to ask questions of the president during events like the one today, and it is at the president's discretion to decide whether and how to answer those questions. It is up to news organizations to determine which journalists they assign to represent them in the pool."

Acosta has been involved in some tense exchanges during White House press briefings with Sanders and her predecessor, Sean Spicer. And that tension in the briefing room has been emblematic of the administration's hostile relationship with CNN, as well as other outlets.

Related: How conservative media shaped Trump's 'diversity visa' tweet

At Monday's briefing, after Sanders said news outlets "purposely" spread false information, Acosta pressed her for relevant examples. She was unable to come up with any. (She did cite an erroneous report by ABC News' Brian Ross regarding former National Security Adviser Michael Flynn's guilty plea, but there has been no evidence or suggestion that the false information in that report was spread "purposely," rather than being the result of an error.)

Trump himself appears to relish his attacks on CNN, perhaps even more so than any other news organization he goes after. After CNN issued a major correction last week on a story about an email Trump and his son had received regarding Wikileaks, the president taunted the outlet on Twitter.

"Fake news CNN made a vicious and purposeful mistake yesterday...Watch to see if @CNN fires those responsible, or was it just gross incompetence?" he said.