BAGHDAD — Two suicide bombers killed more than two dozen people in Baghdad on Monday, mostly street vendors and day laborers gathered at dawn in hopes of finding work at an open-air market, in the first major attack in the Iraqi capital since the government declared victory over the Islamic State.

The carnage in Tayaran Square punctured a growing sense of hope and pride that had permeated Baghdad after Iraq’s security forces, bolstered by large numbers of volunteers and fresh recruits, successfully fought grueling battles against the insurgent group that had held one-third of Iraqi territory and terrorized millions of citizens.

There was no immediate claim of responsibility for the bombings, but officials in charge of security in the capital immediately cast suspicion on Islamic State sleeper cells, the target of Iraq’s intelligence and counterterrorism forces since major military operations ended in the fall.

Even as battles against Islamic State militants raged in northern Iraq and in its second-largest city, Mosul, Baghdad had largely been free of violence. The suicide bombings Monday morning caught many residents of the capital off guard, as they had become used to living relatively free of fear, taking their families to parks and shopping malls.