The deal calls for a three-year period, with Netanyahu serving as prime minister for the first half, and Gantz taking the job for the second half.
Gantz's party will take control of a number of senior government ministries, including defence.
READ MORE:
• Covid 19 coronavirus: Nine new cases as lockdown decision looms
• Covid 19 coronavirus: Jacinda Ardern and Mike Hosking go head to head on 'two business days' language
• Covid 19 coronavirus: Kiwis warned relaxing and socialising could lead to new outbreaks
• Covid 19 coronavirus: Childcare centres refuse to reopen on April 29
The agreement delivers Netanyahu a significant boost as he fights to hold on to power while fending off corruption charges.
His party will gain influence over judicial appointments. The deal also requires the approval of both parties on key appointments including the attorney-general and the state prosecutor — granting Netanyahu veto power over the officials who hold sway over his legal fate.
"I promised the state of Israel a national emergency government that will work to save the lives and livelihoods of the citizens of Israel," Netanyahu tweeted.
After March 2 elections left both men short of a required parliamentary majority, Netanyahu and Gantz agreed to try to form a unity government because of the burgeoning coronavirus crisis.
The talks stalled several times, reportedly over Netanyahu's personal legal problems, sparking concern that they would plunge the country into new elections.
The deal required major compromise by both men.
During three bitter campaigns over the past year, Gantz and his Blue and White party vowed never to serve in a government under Netanyahu so long as he faces a slew of corruption charges. After 11 years as prime minister, Netanyahu agreed to step aside and allow Gantz to take the job, if the coalition manages to survive long enough.
"We prevented a fourth election," Gantz tweeted. "We will protect democracy. We will battle corona and we will worry about all the citizens of Israel."
- AP