Updated

President Bush (search), trying to mend relations with Latin America, pledged Sunday to make a fresh push for stalled immigration reforms and defended the U.S. invasion of Iraq, saying that "history will prove it right."

While the Iraq war (search) is widely opposed in Latin America, Bush said, "The United States of America will stay the course and we will complete the task."

Immigration is a sensitive issue throughout the region and Bush said that his proposed guest worker initiative would strengthen border security and help the economy.

"We would much rather have security guards chasing down terrorists or drug runners or drug smugglers than people coming to work," Bush said at an economic summit here. "And so, therefore, I think a guest worker program is important."

Winding up a three-day visit, Bush spoke at a news conference as a new security flap surfaced following an embarrassing fracas on Saturday in which Bush intervened and pulled his Secret Service agent away from Chilean guards. An elaborate state dinner with 200 people Sunday was downgraded to an official working dinner, reportedly because Chilean President Ricardo Lagos (search) balked at Secret Service demands for guests to walk through metal detectors.

There was no mention of either incident when Bush appeared with Lagos at the end of the Asia-Pacific Economic Cooperation forum, which closed with pledges to shore up global security, fight terrorism and push ahead with negotiations to lower trade barriers.

Both Bush and Lagos acknowledged they had disagreed about Iraq. "Most of the time we will be in agreement. Sometimes we won't," Lagos said. "But that's life."

Bush said he respected Lagos' decision and said they were still friends. "What we're doing is the right thing in Iraq and history will prove it right," the president said.

Bush said no one could argue that Iraq was better off with Saddam Hussein out of power, or dispute the need to support democracy. The president mistakenly said Iraq's elections were being planned for June 30 rather than Jan. 30.

Bush said some of the Pacific-Rim leaders at the summit had expressed concern about the declining value of the U.S. dollar. He said he reiterated the U.S. government's commitment to a strong dollar.

To address short-term deficits, Bush pledged to work with Congress on budgets aimed at reducing the massive federal deficit by half over five years. He said he's also committed to reforms that will help reduce long-term liabilities, such as Social Security for future retirees.

"My commitment to the international world is that we'll deal with the short-term deficient and the long-term unfunded liabilities so that people can then take a look at our dollar in terms of fiscal austerity in Washington," he said.

While in Chile, Bush lost a political battle in Washington when Republicans in Congress blocked passage of an administration-backed overhaul of the nation's intelligence agencies. Bush said he was disappointed and would continue efforts to get it passed when he returns to Washington.

He said he and Vice President Dick Cheney had talked with key members of the House. "It was clear I wanted the bill passed," Bush said.

Bush opened the day with Mexican President Vicente Fox, discussing immigration issues that are sensitive on both sides of the border. Bush began his presidency with a campaign to improve relations with Mexico, but his attention was diverted by the terrorist attacks of Sept. 11, 2001.

Renewing a plan, which stalled in Congress after he unveiled it in January, Bush urged changes in U.S. law that could allow millions of undocumented laborers to work legally in the United States on temporary visas but would not provide a path to citizenship. Fox hopes to persuade Bush to expand his plan.

"One way to make sure the border is secure is to have reasonable immigration policies," the president said. Pledging to push for the immigration bill, Bush said, "I'm going to find supporters on the Hill and move it."

Fox said he wanted to meet with Bush in Washington, possibly in February or March, to discuss economic security issues. "Mexico wants to fulfill its responsibility to make its economy grow, make it stronger, to have more jobs in Mexico," Fox said. "That is our first priority."

Asked whether Bush had promised to move the immigration legislation forward, Fox said in a televised interview: "What I got, and very firmly, is his will, his will to attend this issue."

The summit was a staid gathering of 21 Pacific Rim leaders, but it was not without levity.

For their group photo, the leaders posed in colorful, hand-woven ponchos — following a summit tradition of wearing native garb of the host country.

Bush, arriving at La Moneda palace earlier in the day, greeted Lagos with self-deprecating humor: "Ricardo, aqui esta el gringo." Translation: "Ricardo, the gringo's here."

And on Saturday night, Bush waded into a scuffle that erupted when Chilean authorities blocked the president's Secret Service agents from accompanying him into a dinner. As tempers flared and a shoving match ensued, Bush pushed into the commotion, grabbed his lead agent, Nick Trotta, and pulled him inside.

Flying home to Texas on Monday, Bush will stop in Cartegena, Colombia, to meet with President Alvaro Uribe, a conservative whose war against narcoterrorists and leftist rebels has received major funding from the United States.

The visit allows Bush to make a visible statement about the U.S. commitment to fighting terrorism. It also is meant to highlight American contributions that have helped to bring some stability to a country ravaged by decades of guerrilla war.