MOGADISHU, Somalia (AP) — Mogadishu's new mayor has paid his employees, gotten some of the garbage picked up and turned the lights on. In this city of rubble and bombed-out buildings, where gunfire erupts every few minutes, that counts as progress.

Mayor Mohamed Nur is making an effort to provide basic services for one of the sorriest cities on Earth, a place where officials are much better known for lining their own pockets. Somalis battered by two decades of war have lost faith in the weak central government, which is beset by militias, corruption and infighting. The prime minister resigned Tuesday after a power struggle with the president.

Against this tide of chaos and despair, Nur has a budget of $50,000 a month, two computers and three Olivetti typewriters. A former expatriate who ran an Internet cafe and made a failed run for city council in England, Nur said he has set an unprecedented standard of transparency just by announcing when he receives money, and later announcing how he has spent it.

Nur, 55, said he used his first $50,000 to give token paychecks to some of his 800 employees, most of whom had not been paid for years. He also hired women to clear piles of garbage in his neighborhood, one of the few held by government forces, and persuaded the business community to lend trucks and pay for fuel and labor. The second month's money was used to light some streets.

Islamist insurgents "want to make us believe we are in the dark," Nur said Sunday in the battle-scarred courtyard of the government headquarters. "So we lit up a center of the city."

The work remaining for the mayor, a presidential appointee, is obvious from every corner of Mogadishu, the only part of Somalia directly controlled by the government. Garbage piles up in ruined roads and snags on barbed wire. Near the airport, a blackened spot marks the latest suicide bomb attack.

The U.N.-backed government says it can't protect its citizens and provide services because it only received $11.2 million in aid and revenue last year. But officials acknowledge that most of the money they should have collected — port revenues, for example — has gone missing.

The only visible government presence on the streets are groups of men, in uniform or plain clothes, who lounge in the back of pickups or in the shade nearby, belts of ammunition loosely slung across their shoulders.

Departing Prime Minister Omar Abdirashid Ali Sharmarke said he is resigning to ease political turmoil amid an impasse with President Sheik Sharif Sheik Ahmed. Sharmarke said his sparring with the president has been detracting from the struggle against Islamic insurgents.

The resignation will have little effect on the lives of Somalis or the government, which with the help of African Union troops is barely preventing al-Shabab, an Islamist militia linked to al-Qaida, from seizing the entire capital. Sharmarke and Ahmed had fought over a draft constitution and over their own power and seniority. The bickering alienated many Somalis, who are convinced the government is not focusing on their problems.

"What can the government give us? Nothing," spat Farah Mohamed Abdi, 23. "Schools, nothing. Hospitals, nothing. All they do is eat the money."

Abdi's brother was recently wounded by a stray bullet. Abdi's two sons don't attend school, like 90 percent of Somali children.

Founded centuries ago, Mogadishu was once an important trading city on the shores of the Indian Ocean. Some inhabitants still speak the Arabic of traders who brought Islam to Somalia, and the Italian of the country's former colonial power. In the 1930s, the city featured broad avenues, a Roman Catholic cathedral and — in a sign of peaceful religious coexistence — a mosque with a gleaming white minaret a block away.

A city that developed over centuries crumbled swiftly. Rebels forced out President Mohammed Siad Barre in 1991. Factions then turned their guns on each other.

Elegantly dressed women used to stroll down the seafront. Women now wear long, drab Islamic robes. In areas controlled by al-Shabab, they often must abandon their jobs if the work involves contact with men, leaving some families destitute.

Today the cathedral, like most of Mogadishu, lies in ruins. In 2005, insurgents dug up Italian corpses from the graveyard and flung them into the sea. The mosque still stands and was recently repainted and repaired with money from Somalia's diaspora, but block after block is nothing more than collapsed buildings, bricked-up windows and walls scarred by bullets.

Ugandan and Burundian soldiers, members of a 7,100-strong African Union peacekeeping force that has been in Somalia for three years, trundle down dusty streets in long convoys of white armored vehicles past vegetable sellers and overloaded, ancient minibus taxis. Sweating gunners scan for snipers or bombs buried in the road.

The peacekeepers have been expanding their perimeter into what were once luxury hotels overlooking the seafront, reinforcing their positions by filling sandbags under bright bougainvillea where children once played.

They have punched through walls of villas, many with caved-in roofs, so they can move among them without being exposed to enemy fire. Any valuable items were lost to looters long ago but the items that remain — moldering school certificates, scraps of clothing — point to a vanished life.

The peacekeepers help fill a vacuum left by the government, treating more than 12,000 ill and injured Somalis every month and distributing water and food. Sometimes they feed and supply the government's own demoralized fighters, whose wages, if they receive them, are mostly paid by Italy and the U.S.

A total of $213 million was pledged at a donors conference in April 2009. The U.N. says most of that was for security and the bulk of it went to the peacekeeping force. More than two-thirds has been paid out but exactly where it went has not been made public. Many pledged donations come late, if at all.

Aid organizations say the government doesn't satisfy basic transparency requirements but also acknowledge that they themselves do not pool and publish information centrally themselves, so no one knows how much money flows into Somalia. Some cash arrives in briefcases carried by diplomats or handed over in coffee shops in Nairobi, the capital of neighboring Kenya.

Most of the money collected by government officials never shows up on the books, said Abdirizak Jama, the head of the public finance management unit.

In this nexus of corruption and lawlessness, Mayor Nur's goals for providing primary education, health care and sanitation seem daunting if not impossibly ambitious. He plans to reopen a center to give out vaccinations, rebuild roads and re-establish a central office to issue identity documents and record births, deaths and property certificates.

As he described the plans to a group of journalists this week, gunfire crackled in the distance.