Israeli Prime Minister Benjamin Netanyahu has told his long-running corruption trial that he is being hounded for his hawkish security policies.
The 75-year-old - the country's first sitting prime minister to be charged with a crime - took the witness stand for the first time.
His testimony comes as Israel is engaged in a war in Gaza and facing possible new threats posed by regional turmoil, including in Syria.
Last week, judges ruled that Mr Netanyahu, indicted in 2019, must testify three times a week, forcing the longtime prime minister to juggle between the courtroom and the war room at Israel's Defence Ministry, minutes from the courthouse.
He took the stand for about four hours and will resume his testimony tomorrow.
Twice his military secretary handed him written messages, the first time requiring a recess and underscoring his having to do double duty as prime minister.
Mr Netanyahu, who leads the right-wing Likud party, assailed the Israeli media for what he called its leftist stance and accused journalists of having hounded him for years because his policies did not align with a push for a Palestinian state.
"I have been waiting for eight years for this moment to tell the truth," he told the three-judge court.
"But I am also a prime minister ... I am leading the country through a seven-front war. And I think the two can be done in parallel."
Mr Netanyahu was indicted in three cases involving gifts from millionaire friends and for allegedly seeking regulatory favours for media tycoons in return for favourable news coverage.
He denies any wrongdoing and has pleaded not guilty.
"Had I wanted good coverage all I would have had to have done would be to signal toward a two-state solution. Had I moved two steps to the left I would have been hailed," the prime minister said.
Mr Netanyahu stood rather than sat in the witness box while testifying.
In lengthy replies, he portrayed himself as a staunch defender of Israel's security, withstanding pressures from international powers and a hostile domestic media.
He smiled confidently when he entered Tel Aviv District Court this morning.

The trial was moved from Jerusalem for undisclosed security reasons and convened in an underground courtroom.
Before Mr Netanyahu took the stand, his lawyer Amit Hadad laid out for the judges what the defence maintains are fundamental flaws in the investigation.
Prosecutors, Mr Hadad said, "weren't investigating a crime, they were going after a person".
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
A few dozen protesters gathered outside, some of them supporters and others demanding Mr Netanyahu do more to negotiate the release of some 100 hostages still held by militant group Hamas in Gaza.
Israel has been waging war in the territory for more than a year, during which Mr Netanyahu was granted a delay to the start of his court appearances. Last Thursday, judges ruled that he must start testifying.
In the run-up to his court date, the Israeli leader revived familiar pre-war rhetoric against law enforcement, describing investigations against him as a witch hunt.

Before the Gaza conflict, Mr Netanyahu's legal troubles bitterly divided Israelis and shook its politics through five rounds of elections.
His government's bid last year to curb the powers of the judiciary further polarised citizens.
The shock Hamas attack on Israel on 7 October 2023, and the ensuing Gaza war, swept the prime minister's trial off the public agenda as Israelis came together in grief and trauma.
But as the war dragged on, political unity crumbled.
Explained:
Benjamin Netanyahu's corruption trial
Latest Middle East stories
In recent weeks, while fighting abated on one front after Israel reached a ceasefire with Hamas' Lebanese ally Hezbollah, members of Mr Netanyahu's cabinet, including his justice and police ministers, have clashed with the judiciary.
His domestic legal woes were compounded last month when the International Criminal Court issued an arrest warrant for him and his former defence chief Yoav Gallant, along with a Hamas leader, for alleged war crimes in Gaza.