Yahoo Inc's chief executive was verbally lashed by U.S. lawmakers on Tuesday over the Internet company's role in helping identify a Chinese dissident who was later imprisoned by the government.

While technologically and financially you are giants, morally you are Pygmies, Rep. Tom Lantos, chairman of the House Foreign Affairs Committee, told CEO Jerry Yang and Yahoo's general counsel, Michael Callahan, at the three-hour hearing.

Yang and Callahan were battered with criticism from both Democrats and Republicans over the case of Shi Tao, a reporter accused by Chinese authorities of leaking state secrets abroad and sentenced last April to 10 years in prison.

Shi's crime was to forward to foreign human rights groups an e-mail from Chinese government authorities that directed journalists to avoid coverage of the 15th anniversary of the Chinese army killings of pro-democracy protesters near Tiananmen Square in 1989, said Lantos, a California Democrat.

At Tuesday's hearing, Yang apologized to the committee and to Shi's family, and said Yahoo was doing what it could to help get Shi released.

With members of Shi's family seated behind him among the spectators, Yang told the committee that Yahoo did not know that the personal information sought by the Chinese government involved a political dissident when its China office turned over the data.

I don't think anyone (with Yahoo) was trying to do anything wrong, Yang said.

Yahoo sold its Yahoo China subsidiary to Chinese Internet company Ltd in exchange for a 40 percent stake in Alibaba.

Callahan said Yahoo was looking for ways to structure its operations in other countries to keep data out of the hands of repressive regimes in the future.

But Yang said he still believes in a policy of engagement with China. Despite the restrictions, he said, the Internet has made Chinese people more informed.

It's very important to figure out how to move forward here ..., Yang said.

Yang stopped short of endorsing legislation pending in the House that would bar U.S. Internet companies from cooperating with authorities in China and other repressive regimes.

The bill is designed to stop companies like Yahoo from turning over personal information to governments that use it to suppress dissent.

It would also give individuals the right to sue companies in a U.S. federal court if their information was improperly disclosed.

The two Yahoo executives would not commit to providing financial help to Shi's family, despite demands from committee members that they do so.

Callahan said a decision to extend help to Shi's family would be complicated. He cited a dissident who was targeted for retaliation by the Chinese government after expressions of support in the United States.

Committee members, frustrated with the answers, questioned why no one at Yahoo had been fired after the incident.

They claimed Callahan gave misleading testimony to the same committee in February of last year. He told the committee then he did not know about the political nature of the Chinese investigation into Shi.

Callahan said he discovered later in 2006 that the case involved state secrets, a phrase critics say is code for matters involving political activists.

But Callahan said he still did not understand the politics involved, and did not call the committee to set the record straight.

Given what I now know about the misunderstanding and concern created, I deeply regret that I did not think to contact you ... Callahan said in a prepared statement.

But the answer did not generate much sympathy. A reasonable person who receives such an order would immediately know that the case in question involves a political or religious dissident, Lantos said.

(Editing by Tim Dobbyn/Jeffrey Benkoe)