Jerusalem (CNN) Benjamin Netanyahu was on course to secure a record fifth term as Israeli Prime Minister after his main election rival conceded defeat on Wednesday evening.

After a dramatic finish to a tightly-fought race, former army chief Benny Gantz accepted that Netanyahu had won. "We are all democratic, we all accept the decision of the nation," Gantz said.

With more than 97% of the vote counted, according to Israeli media, a bloc led by Netanyahu's Likud party would secure 65 seats in the 120-strong Knesset. A center-left bloc led by Gantz's Blue and White party, supported by the Arab parties, would only muster 55 seats.

Likud supporters celebrate as Prime Minister Benjamin Netanyahu waves to them at its headquarters in Tel Aviv.

Likud tied with Blue and White, gaining 35 seats each. But Netanyahu's path back to power is clearer, combining seats won by two ultra-orthodox religious parties, which both polled well, with those of smaller right-wing groups.

Netanyahu claimed victory Tuesday night. "The right-wing bloc led by the Likud won a clear victory. I thank the citizens of Israel for the trust. I will start forming a right-wing government with our natural partners as soon as tonight," Netanyahu said.

Read More