BAGHDAD — A suicide bomber detonated a pickup truck loaded with explosives on Monday in a busy Baghdad market, killing at least 36 people hours after President François Hollande of France arrived in the Iraqi capital.

The Islamic State later claimed responsibility for the attack.

The bomb went off in a produce market that was packed with day laborers, a police officer said, adding that another 52 people were wounded.

During a news conference with Mr. Hollande, Haider al-Abadi, Iraq’s prime minister, said the suicide bomber had pretended to be a man seeking to hire day laborers. Once the workers gathered around, he detonated the vehicle.

The Islamic State, also known as ISIS or ISIL, claimed the attack in a statement circulated on a website that is often used by the group. It was the third such attack in three days in or near Baghdad, underscoring the lingering threat posed by the extremist group despite a string of setbacks for it elsewhere in the country over the past year, including in and around the northern city of Mosul.