By Helen Popper

BUENOS AIRES (Reuters) - Argentina's Congress approved early on Thursday a agreement with Iran to investigate the 1994 bombing of a Buenos Aires Jewish community center that Argentine courts have long accused Tehran of sponsoring.

Jewish leaders say the pact to set up a "truth commission" risks undermining the ongoing judicial investigation into the attack, which killed 85 people, but President Cristina Fernandez says it could shed new light on the case after years of deadlock.

The leftist president has close ties with other Latin American leaders who are on good terms with Tehran, such as Venezuela's Hugo Chavez, and her supporters hailed the memorandum of understanding as an historic opportunity.

"This memorandum represents a bold decision, a brave decision that opens a possible path toward the truth," said ruling party lawmaker Mara Brawer during a heated 12-hour debate as Jewish community groups protested outside Congress.

Fernandez controls both houses of Congress, meaning final ratification of the accord was expected, but opposition lawmakers questioned the government's motives, some saying commercial interests of oil and grain sales lay behind it.

The measure passed narrowly with 131 votes in favor and 113 against.

"This is the chronicle of a failure foretold," said opposition lawmaker Eduardo Amadeo, an ex-ambassador to Washington, accusing the government of putting commerce before justice and criticizing Iran's record on human rights.

"We're going to sell out the victims for a barrel of oil."

Others cited Iran's growing imports of farm goods from the South American nation, one of the world's top grains suppliers, and said they feared the commission would undermine the evidence gathered by Argentine prosecutors so far.

"They're asking us to ... create a commission that will act like an audit of the Argentine judicial system," said Ricardo Alfonsin of the centrist Radical party.

In a sign of how close the vote was, the ruling party took the unusual step of summoning two lawmakers on leave. They had to quit local government posts to be able to attend the session.

REPUTATION

Center-left lawmaker Elisa Carrio said the deal would further damage the G20 country's international reputation, which has been tarnished over the last year by messy legal wrangles with bondholders, trade disputes and criticism of its inflation data by the International Monetary Fund.

"Argentina is going to be much weaker in the eyes of the global community as a result of this accord," she said.

The accord will establish a five-member commission made up of foreign legal experts and outlines plans for Argentine judicial officials to travel to Tehran to question those people for whom Interpol has issued arrest warrants.

Iran, which remains locked in a stand-off with world powers over its disputed nuclear program, denies links to the attack.

In 2007, Argentine authorities secured Interpol arrest warrants for five Iranians and a Lebanese over the attack in which an explosives-laden truck detonated outside the Argentine Israeli Mutual Association (AMIA) building.

Iranian Defense Minister Ahmad Vahidi is among the Iranian officials sought by Argentina, which is home to Latin America's largest Jewish community.

Western and Israeli sources have voiced concerns that Argentina may have lost its interest in pursuing investigations of the 1994 attack, as well as the bombing of the Israeli Embassy in Buenos Aires that killed 29 people two years earlier.

The Islamic Jihad Organization, believed to be linked to Iran and the Lebanese militant group Hezbollah, claimed responsibility for the 1992 bombing.

Argentine, Israeli and U.S. officials have long blamed the AMIA attack on Hezbollah guerrillas backed by Iran.

(Editing by Alison Williams)