Iraqi construction workers shovel stones at a building site in Baghdad on June 7, 2011. (SABAH ARAR/AFP/GETTY IMAGES)

In a city where sand clings to everything and the culture permits empty plastic water bottles to be tossed into the street, residents in the prosperous Zayuna neighborhood make sure their lawns stay green and their fruit trees are pruned.

But when Baghdad’s residents step out of their walled-in sanctuaries, they can’t escape a city that in many ways still feels ungovernable more than eight years after the U.S.-led invasion.

They see dirt and gravel streets marked by ruts and sinkholes large enough to swallow a tire. Empty lots are garbage pits, and sewage from broken pipes collects in small pools on streets amid downed cables and wires. There are a few slides at the neighborhood playground, but nearly just as many abandoned cars.

“We don’t know who is in charge,” said Alayau al-Sukuti, standing outside one of the neighborhood’s many expensive houses. “Who should provide services? Security? We don’t even try to go to [the government] anymore.”

In Baghdad, where about a quarter of all Iraqis reside, determining who is in charge is a complicated and confusing exercise that tests the patience of residents and municipal leaders still feeling their way in a democracy. The country, backed by a $400 million U.S. initiative to establish local governments, has been making steady progress in creating local bodies to provide services to residents.

But Baghdad’s quasi-federalized structure poses a unique challenge for U.S. and Iraqi officials trying to determine new boundaries for the city and where a mayor’s power starts and a governor’s ends, according to U.S. government reports.

“The problem is, nobody knows who is responsible,” said Mahmoud Othman, a member of parliament who sits on the governance committee.

Questions about command and control have hung over Baghdad since the initial days of the war, when U.S. forces were ill-equipped to contain widespread looting after the collapse of Saddam Hussein’s regime.

Although security has improved in recent years, the task of overseeing the estimated 250,000 police and army officials who guard the city has created management issues, including gaps in intelligence sharing and a lack of organizational clarity. For instance, frustrated local officials say they do not know whom to contact about suspicious vehicles. Meanwhile, Baghdad’s municipal government continues to sputter as different entities jockey for control over reconstruction dollars and grapple over whether American-style local governments can work in the Middle East.

“Baghdad lives in chaos, chaos, chaos,” said Jawad al-Hasnawi, a parliament member.

In the coming weeks, the parliament is set to consider Baghdad’s “capital law,” which is designed to clarify who controls the city. But in a country with about 20 major political blocs, an increasingly restless electorate and a parliament often consumed with infighting, few lawmakers expect a quick resolution.

“Everyone is accusing the others, and nobody is trusting the others,” said Mayor Saber al-Issawi. “That kind of confuses our work.”

Under Hussein — a time when, Zayuna residents said, their neighborhood was tidy — Baghdad had a mayor and city council that tried to keep on top of basic needs for its 5.5 million residents. Hussein kept a tight grip on security, and national ministries oversaw the distribution of most residential services.

After the 2003 U.S.-led invasion, as Hussein-era ministries essentially stopped functioning, U.S. authorities dissolved the city council and set up a 57-member provisional council for the Baghdad region, which includes more than 7 million people. The council elects a regional governor, who assumes some responsibility for the city and its suburbs.

Yet, Iraq’s constitution identifies Baghdad as a unique federal city, one that should not be governed by regional leaders. That means, the mayor said, that he retains control over city services, even though federal agencies continue to exert significant influence.

In many ways, Baghdad is facing some of the same challenges that elected officials in the United States encountered — and continue to grapple with — in the creation and management of its capital. The lines of authority in Washington were not ironed out for generations, and even then, gaps in security and coordination were exposed in the aftermath of the Sept. 11, 2001, terrorist attacks.

For the time being, in heavily militarized Baghdad, Prime Minister Nouri al-Maliki has the upper hand.

This year, Maliki appointed a police chief for Baghdad from the southern city of Basra, ignoring recommendations from provincial council members, who say the constitution gives them the right to make the appointment.

“Maliki is trying to keep as much power in his hands as possible,” said Marina Ottaway, director of the Middle East program at the Carnegie Endowment for Peace, citing the fragile state of the coalition government. “A lot of autonomy for Baghdad would be particularly bad for Maliki.”

But the prime minister is facing growing pressure to cede authority to more localized policing. The city’s perilous security situation, with near-daily bombings and assassinations, is just part of what makes life so difficult here, for residents as well as the officials jockeying for the right to govern them.

In Baghdad, it’s still common to see homeowners digging their own cable or sewer line across public streets, without permits. The city has “several large lakes” of untreated sewage in residential areas, and large swaths of residents do not have drinkable water, according to the United Nations.

Issawi, the mayor, said the city hopes to pave 13 million square meters of road, open what he calls the largest recycling center in the Arab world and complete several large water treatment plants that will guarantee clean drinking water until 2030. Issawi also plans to spend $500 million to redevelop the city’s main commercial district and $150 million to reconstruct the opera while also expanding the city’s borders to allow for growth.

Others say it will take more than a strong mayor to solve Baghdad’s problems.

“Instead of building an opera, we should be fixing our streets,” said Mohammed Alrubi, who heads a provincial council planning committee.

Special correspondents Aziz Alwan and Asaad Majeed contributed to this article from Baghdad.