JERUSALEM — In a harsh interview published on Friday, less than three weeks before Israel’s national elections, a former head of the internal security service accused Prime Minister Benjamin Netanyahu of placing his “personal, opportunistic and current interests” over those of the state when making crucial policy decisions regarding the Iranian nuclear program, the Palestinian conflict and other matters.

Yuval Diskin, who resigned 18 months ago as head of the security service, known as the Shin Bet, said other prime ministers he had worked closely with — both conservative and liberal — “came from this place in which the interests of the state stand above all else,” in contrast to Mr. Netanyahu and his defense minister, Ehud Barak. Mr. Diskin made headlines last spring with public comments accusing the two men of “messianic” leadership and of “misleading the public” regarding the likely effectiveness of an attack on Iranian nuclear facilities, and in the interview published on Friday — conducted by Dror Moreh, director of “The Gatekeepers,” a new documentary featuring Mr. Diskin and five other former Shin Bet directors — he expands the critique.

“When I look at Netanyahu, I don’t see a shred of personal example as a leader in him,” Mr. Diskin said in the interview, which ran more than 5,000 words in the weekend edition of Yediot Aharonot, Israel’s leading newspaper. “There is a leadership crisis. It’s a crisis of value, it is total disregard for the public. People may think that I see this in an overly extreme manner. I am telling you that from up close, things look even worse.”

The prime minister’s office issued a statement calling Mr. Diskin’s accusations “groundless,” and “motivated by his personal frustration” that Mr. Netanyahu did not choose him to head the Mossad, Israel’s international intelligence agency. The statement also said the critique was being “recycled for political reasons.” Mr. Barak’s office called the claims “astonishing, both in content and in their timing,” given elections scheduled for Jan. 22.