Brig. Gen. Kathleen Cook, the Air Force's public affairs director, on Monday denied she retweeted a Fox News tweet criticizing President Obama's immigration policy.

Cook's account took down the Friday evening retweet on Saturday. "I did not nor would I ever tweet/RT [retweet] a political statement. I will figure out how to remove it!!!" Cook tweeted at someone who criticized the retweet.

If Cook did send the retweet, such criticism by a commissioned officer could be a violation of the Uniform Code of Military Justice.

Air Force spokesman Lt. Col. Christopher Karns said that Cook inherited the official Twitter account — @USAFPABoss — when she took over as public affairs director in March. She did not change the password until the controversy over the retweet erupted, and Karns said at least seven other people had access to the account.

Some public affairs staffers have in the past tweeted on Cook's behalf through the official account, Karns said, although Cook is now the only one who has the new password.

On Friday evening, Cook's official Twitter account retweeted Fox News anchor Megyn Kelly. Kelly's tweet quoted Fox News digital politics editor Chris Stirewalt as saying "The president has decided that the last two years of his term are going to be a disaster." The tweet also included the hashtags #ImmigrationAction and #KellyFile. The next day, blogger and former airman Tony Carr posted a screenshot of the tweet on the Facebook page for his blog, John Q. Public.

Carr later noted on his blog that a one-star general tweeting remarks disparaging the commander-in-chief "would place her in violation of the Air Force's social media policy as well as many fundamental customs of officer conduct." Article 88 of the Uniform Code of Military Justice says "any commissioned officer who uses contemptuous words against the President" can be punished by a court-martial.

Cook's account took down the retweet on Saturday, and Cook said she did not send it.

"I did not nor would I ever tweet/RT [retweet] a political statement. I will figure out how to remove it!!!" Cook tweeted at someone who criticized the retweet.

In a Monday statement to Air Force Times, Cook said that she was on leave Friday and not on Twitter.

"Throughout this entire process, I have been on leave tending to my daughter who had surgery this past Friday," Cook said. "I was not on Twitter at the time of the post. It would be inappropriate to speculate as to how the retweet occurred without gathering all the facts. We're looking into the matter closely and have already found that several other people had access to the account over the last few years. We have changed the password. While I remain on leave, obviously, I am concerned and I am engaged in determining how this could have happened."

Also on Friday, Cook's official Twitter account — @USAFPABoss — also favorited a Washington Post article on immigration and a tweet from Air Force Lt. Gen. Stephen Wilson.

Air Force spokesman Lt. Col. Christopher Karns said that Cook inherited the official Twitter account -- @USAFPABoss -- when she took over as public affairs director in June. She did not change the password until the controversy over the retweet erupted, and Karns said at least seven other people had access to the account.

Some public affairs staffers have in the past tweeted on Cook's behalf through the official account, Karns said, although Cook is now the only one who has the new password.

Karns said that Cook typically tweets from a computer, not a phone, though he understands her phone has the capability to run Twitter. Karns said Cook does not have a second personal Twitter account.

When asked if the Air Force had ruled out a hacking by an outside party, Karns said "We're considering all possibilities but don't want to jump to any conclusions. We have taken the appropriate preventative measures to minimize a future occurrence. As an organization we will be more mindful of social media security and will improve practices. We are learning from this occurrence and will deal with it appropriately."