For weeks the rumor had been going around Kampala that Libya’s Muammar Qaddafi was imminently to arrive. March 30th brought news that seemed to confirm the suspicion: Uganda, Al Arabiya reported, had offered Qaddafi asylum. A spokesperson for Ugandan president Yoweri Museveni would eventually deny the report—“How can you offer to bury someone on your plot when that person is not yet dead?” he complained—but I took the excuse to drive up to the Qaddafi National Mosque.

It was a hot afternoon when I arrived at the top of Old Kampala Hill. Rains the night before had scrubbed the sky of its usual haze, leaving a clear view of the undulating capital. Though easily the most conspicuous item in Kampala’s skyline, the Qaddafi Mosque is just one of several hilltop monuments to Uganda’s past and future devotions. Kasubi Hill features the burned tombs of the Buganda kings; Namirembe and Rubaga have the Anglican and Catholic cathedrals; Nakasero gets the unfinished Hilton, a 23-story hotel that’s been due to open “soon” for going-on five years.

I parked among the circling shadows of marabou storks, big, bald trash-eating birds that look like they’ve escaped a malarial fever dream, and was greeted by a friendly young guard with a carbine on his shoulder. He introduced me to Juma, a guide in blue coveralls who had worked as a porter during the mosque’s construction.

From across the city, the burnished domes and copper-topped minaret of the Qaddafi Mosque give it the appearance of an extravagant mirage. Up close, it seems merely huge. The exterior of the main hall is the opposite of intricate, all arches and sand-colored concrete. Forget the ambient piety for a moment and it’s not difficult to imagine the main building anchoring a Southern California luxury mall.

Inside is another story. Large doors carved of Congolese mahogany open onto an endless rug of delicate Libyan design. Clerestory windows and wrought chandeliers (conscientiously but incongruously lit by compact fluorescent bulbs) brighten the fine patterns that scale the cup of each dome.

Building atop Old Kampala Hill, site of the city’s first European settlement, was Idi Amin’s idea. Though less than 10 percent of Uganda’s population was Muslim, he wanted the hill to host Africa’s largest mosque. Amin secured Saudi funding for the project, but by the time he fled into exile in 1979, chronic embezzlement had left little more than a crooked minaret.

Qaddafi took over in 2003. He scrapped the existing work and funded an expanded complex that included a conference center, computer-training facility, and residence for the local mufti. To make room for the new construction, Libyan contractors demolished the former home of the man Juma described as “Uganda’s first muzungu,” or foreigner—the British colonial administrator Frederick Lugard.

The civil war in Libya has left many in the West scrambling to explain how Libyan oil money found its way into campaign accounts and university endowments. Among Africa’s leaders there has been less embarrassment than genuine ambivalence, a reaction captured by a rambling article that Museveni recently published. While conceding that Qaddafi’s support for Amin and his sponsorship of terrorism were “unfortunate and unnecessary,” Museveni nevertheless praises the Libyan dictator’s “independent foreign policy,” his nationalism, and his investment in Libyan development: “From the TV pictures,” Museveni writes, “you can even see the rebels zooming up and down . . . on very good roads . . . . Who built these good roads?”

This ambivalence is easy to understand. Libya has invested more than $8 billion in the rest of Africa. Like Ozymandias, Qaddafi imagines himself the king of kings, and last year he told the continent’s leaders he had $90 billion available to bring his dream of a United States of Africa to fruition. In this light the scale and prominence of the Qaddafi Mosque look more like a reflection of Qaddafi’s pan-African fantasy than any indication of Muslim influence in Uganda.

Many of the Ugandans I’ve spoken to think it’s time for Qaddafi to step down. Juma, whose coveralls bear the logo of the mosque’s Libyan-funded caretaker, not surprisingly disagrees. “We pray that God will help Qaddafi,” he told me. “He has been very good to us.”