Thousands were expected to participate in Jerusalem's annual Gay Pride march Thursday under high security following a knife attack by a Jewish religious extremist that killed a teenager in 2015.

Police were deploying some 2,500 undercover and uniformed officers for the parade that starts at a park in the Holy City and continues through nearby streets in the late afternoon and into the evening.

Ahead of the march, police said they had arrested two people suspected of planning to disrupt the event, without providing further details.

This year marks the 18th Gay Pride march in Jerusalem, but due to the city's conservative religious character, controversy and even violence have erupted at times.

The city has hung rainbow flags along the march's route despite Jerusalem chief rabbi Avi Stern requesting it not be done to "avoid hurting the feelings of part of the population."

City hall has also ordered the removal of posters denouncing the march and reading "Father and Mother = Family. The courage to be normal."

A 2015 knife attack that killed a 16-year-old girl and wounded several others remains fresh in the minds of many.

The attacker was Yishai Shlissel, an ultra-Orthodox Jew now serving a life sentence.

Shlissel had spent 10 years in jail after a similar attack on the 2005 Jerusalem Gay Pride march and had been released just three weeks before the event, leading to heavy criticism of the police.

The Jerusalem parade has taken on added significance since then, with many from outside the gay community joining the march in solidarity and to call for tolerance.

Organisers were planning to leave flowers at the location of the stabbing.

Israel has the most open attitude to homosexuality in the Middle East, with a large and influential gay community.

But conservative Jerusalem, which is sacred to Jews, Muslims and Christians, is far less gay-friendly than liberal Tel Aviv.

The march takes place only in mainly Jewish west Jerusalem and not in the city's annexed eastern sector, which is claimed by the Palestinians as the capital of their future state.

On Wednesday night, Prime Minister Benjamin Netanyahu announced the appointment of Israel's first openly gay minister.

But many analysts saw Amir Ohana's appointment as justice minister months ahead of September 17 elections as strictly politically motivated since he has expressed support for a proposal that would result in Netanyahu being granted immunity from prosecution.

Netanyahu faces possible indictment for corruption in the months ahead.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.