CHARLOTTE, N.C. (JTA) — At President Obama’s behest, and to boos from some delegates, Democrats on Wednesday night inserted a few lines into their party platform affirming Jerusalem as Israel’s capital.

Two of the lines had appeared in the 2008 party platform but had been dropped for some reason when this year’s platform was released Monday night; no one could quite explain the omission.

The removal of the language had prompted a firestorm of criticism from Republicans, including their presidential nominee Mitt Romney, and from Democratic lawmakers in Congress, who said the removal of references to Jerusalem had blindsided them. Pro-Israel groups also asked that the language be restored to the party platform.

"Jerusalem is and will remain the capital of Israel," stated the amendment that passed Wednesday evening when the party’s platform committee met in Charlotte, the site of this year’s Democratic National Convention. "The parties have agreed that Jerusalem is a matter for final status negotiations. It should remain an undivided city accessible to people of all faiths."

Robert Wexler, a top Jewish surrogate for President Obama’s reelection campaign and a drafter of this year’s platform, told JTA that Obama played a direct role in the change. "The president directly intervened to make sure this amendment happened," he said.

The first two sentences appeared in the 2008 platform. The third satisfied longstanding demands from pro-Israel groups that Obama restate the pledge he made at the 2008 American Israel Public Affairs Committee annual policy conference that he is committed to an "undivided" Jerusalem.

Antonio Villaraigosa, the mayor of Los Angeles and a chairman of this year’s convention, faced a chaotic scene when he brought the committee’s reconstituted language to the full floor for a vote. The amendment also restored the word "God" to the platform, following complaints from some religious groups.

It took three voice votes to pass the language, and although Villaraigosa finally declared a two-thirds majority, it was not clear that the amendment received majority support. Boos were audible.

The Republican Jewish Coalition, the Romney campaign and the Arab American Institute suggested that what Democratic opponents at the convention didn’t like was the change made to the Jerusalem language.

Romney’s campaign spokeswoman, Andrea Saul, called the approval of the language "begrudging." Matthew Brooks, RJC’s executive director, said, "To hear delegates on the floor of the Democratic convention strongly voice their opposition to recognizing Jerusalem as the capital of Israel, then boo when the chairman passes the resolution to adopt that language, is a shock." James Zogby, the Arab American Institute president, expressed his pride "that so many delegates delivered a resounding no.”

C-SPAN video showed delegates in the institute’s "Yallah, Vote" T-shirts voting against. But a report from the floor on the news website BuzzFeed cited myriad reasons by delegates for their opposition. Some objected to the God language; others appeared to resent having the resolution forced past them without consideration.

“I didn’t get a chance to read it and there was no discussion," John Washburn, a delegate from Georgia, told BuzzFeed. "It was up there for 30 seconds and then it was down. I’m upset with the process. That’s why I voted no."

An array of congressional Democrats had complained on Tuesday and Wednesday about the removal of the Jerusalem language from the party platform, saying they were caught unaware.

Sen. Robert Casey (D-Pa.) said he was angry when he learned of the omission. "It’s wrong," he told JTA, although he added that "these platforms don’t have a lot of meaning in terms of the work I do in the U.S. Senate."

Rep. Shelley Berkley (D-Nev.), who is running for Nevada’s U.S. Senate seat and is one of the most steadfastly pro-Israel Democrats in Congress, said it was an understatement to say she was disappointed.

"I believe with every breath in my body that Jerusalem is the eternal and undivided capital of Israel," she told JTA. Berkley added that she believes Obama’s record on Israel overall is supportive, noting the enhanced U.S.-Israeli security relationship and Obama’s efforts to push back in the United Nations against anti-Israel measures.

Obama campaign officials had said the language was removed because the overall platform focused on the president’s achievements — in Israel’s case, the enhancement of defense cooperation and the isolation of Iran.

Few Jewish organizations publicly complained, but the groups lobbied behind the scenes. Once the language was changed, AIPAC, the Anti-Defamation League and the Orthodox Union quickly praised the Democratic National Committee.

"We welcome reinstatement to the Democratic platform of the language affirming Jerusalem as Israel’s capital," AIPAC said in a statement. Of both the Republican and Democratic platforms, the statement said, "Together, these party platforms reflect strong bipartisan support for the U.S.-Israel relationship.

The inclusion of the line about Jerusalem remaining "undivided" actually allowed Democrats to trump Republicans, who removed the word from their 2012 platform language on Israel and Jerusalem. The Republican National Committee did not return requests for comment on why the word was removed.

The Republican Jewish Coalition said Wednesday that it would run ads in Jewish newspapers in swing states noting the omissions; it was not clear if the ads would run now that the language was amended

Delaware Gov. Jack Markell, who led a training session for elected Jewish Democrats at the Democratic convention, countered that the Democrats should run their own ad noting that the Democratic platform explicitly threatens the use of military force against Iran should it obtain a nuclear weapon, while the Republican platform is less specific, referring only to "all options."