Prime Minister Benjamin Netanyahu of Israel announced plans on Thursday to build thousands of new housing units in contested East Jerusalem, which critics say could doom any prospect of a deal with the Palestinians.

It is likely to be years before any of the 6,200 units would be built, but the announcement, 11 days before a national election, was widely seen as an effort by Mr. Netanyahu to solidify support among his right-wing base.

The homes are slated for two areas in East Jerusalem, which was captured by Israel from Jordan in the 1967 war and has been long demanded by Palestinians as the capital of a future independent state. Israel unilaterally annexed the area as part of its capital, a move not recognized by most countries but endorsed by President Trump’s Middle East plan.

“We are joining up all the parts of unified Jerusalem,” Mr. Netanyahu announced in a video shot against the backdrop of Har Homa, one of the two neighborhoods where the new homes will be built.