Updated

President Obama shook hands with Libyan leader Muammar al-Qaddafi Thursday, a sign that relations have improved considerably between the U.S. and the North African nation.

The two met as they posed for pictures ahead of a G-8 summit dinner hosted by Italian President Giorgio Napolitano.

Obama's diplomatic gesture was his latest effort to reach out to controversial world leaders in an attempt to improve the United States' standing around the world, which he says was damaged by former President Bush's unilateral diplomacy.

But it was Bush who restored full diplomatic relations with Libya in 2006 after the formerly isolated country, which was recognized as a sponsor of terrorism, announced it was ending its weapons of mass destruction program.

Obama also shook hands with Venezuelan President Hugo Chavez in April at the Summit of Americas, where Chavez gave Obama a book critical of U.S. foreign policy.

In Italy, Obama posed for a photo, standing between Napolitano and Prime Minister Silvio Berlusconi and then socialized with others, including U.N. Secretary General Ban Ki-moon and Turkish Prime Minister Tayyip Erdogan.

Qaddafi entered the room in a colorful outfit, with red and gold draping over his shoulder and matching shirt and pants.

Despite improved international relations, Qaddafi remains a controversial figure. He criticized the U.S.-led war in Iraq during a speech last month to the Italian Senate.

"Iraq was a fortress against terrorism. With Saddam Hussein, Al Qaeda could not get in, but now thanks to the United States it is an open arena and this benefits Al Qaeda," he said.

He also compared the U.S. air strike on Tripoli in 1986, in which one of his daughters was killed, to an Al Qaeda attack.

"What difference is there between the American attack on our homes in 1986 and bin Laden's terrorist actions?" he asked. "If bin Laden has no state and is an outlaw, America is a state with international rules."