Newsweek issued an apology Wednesday after one of its senior writers compared Sen. Ted Cruz, R-Texas, and his supporters to Nazis.

"I would like to express on behalf of Newsweek our disappointment that this occurred and reiterate that this does not align with our editorial values," the magazine's editor-in-chief, Jim Impoco, said in a statement provided to the Washington Examiner's media desk.

The apology came after Newsweek's Alexander Nazaryan tweeted a picture of Nazi soldiers, and included a caption that read, "Ted Cruz has a strong ground game in Iowa."

After the image sparked backlash on social media, Nazaryan quickly deleted it, and issued a half-hearted apology.

"I deleted my tweet calling Ted Cruz a Nazi. Not fair to his totally decent supporters, as much as I dislike the man himself," he said on Twitter.

Impoco added in his apology Wednesday afternoon that the now-deleted tweet was "outside of our social media policy."

"I apologize for any doubt that this might have cast on Newsweek's editorial integrity or credibility. We've addressed the situation with Alexander and the rest of the staff and will be reviewing and reiterating our social media policy in coming days," his statement added.

Nazaryan's supposed apology did not seem to apply to Cruz, whom the Newsweek writer appears to despise deeply.

"Ted Cruz is an atrocity of a human being," the senior writer said on social media on Tuesday.

He said elsewhere that Cruz had gone "full [Donald] Trump," adding later that, "It's time to shame not only Donald Trump, but those among his supporters who are openly bigoted and racist."

Nazaryan, who served previously on the New York Daily News' editorial board, uses his capacity as senior writer to cover a wide range of topics, including politics, education and national security. He also explained in response to criticism Wednesday morning that his position at Newsweek allows for the airing of harsh opinions.

"[P]art of my job is having opinions. One opinion I have is that Ted Cruz would be a very bad president," he told one critic on social media.

Nazaryan did not immediately respond to the Washington Examiner's request for comment.