If Mohamed Hassan Said is not China's saddest foreign resident, he almost certainly is the most bored -- because he has absolutely nothing to do. Since 1988, Said has served as the ambassador of Somalia, but for the last few years he has presided over an embassy that doesn't function, representing the defunct government of a state that no longer exists.

He has not received a salary since the Somali government collapsed in January 1991, and he survives on occasional handouts from friendly Islamic embassies.

He has not been out of China in more than five years because he has no money to go anywhere and no place to go.

The Chinese government keeps the electricity, heat and telephone turned on, but it withdrew all his local employees. He has closed the embassy building and stays in the ambassador's residence in back, where he and his wife cook and clean for themselves.

And most days, he fills his time doing, well, nothing. "I consider myself to be on a long holiday," he said, entertaining a rare visitor with coffee and samosas in the once posh, now slightly dingy room he uses for receiving guests. He adds wryly, "I don't feel pushed."

"I came here to serve my nation, but I'm not doing much of that because there is no government as far as I can see," said the 56-year-old lawyer and veteran diplomat, whose five children also live in China. "I've been marooned here for eight years."

Two other Somali diplomats assigned to the embassy are stranded with him here, mainly for lack of any other place to go. Before chaos and anarchy gripped their homeland, the Somali staff numbered nine, but the others have moved on, emigrating to other countries.

"The office is more or less closed, because of the lack of work and also the lack of staff," Said said. "As far as our existence goes, we are at, well, subsistence level. But we are doing better than the Somalis left back in the country, so we can't complain."

With Mogadishu, the Somali capital, carved up among warring factions and no side strong enough to claim control or form a government, this might be one of the last lonely outposts of Somali sovereignty left on earth. But the Somali flag doesn't even fly here; a few years ago, a strong wind snapped the line on the flagpole, and Said never got it repaired. Besides, with no staff, raising the flag in the mornings and pulling it down at night seemed more trouble than that residual display of national pride was worth.

"It's a bother," he said.

Said still has his official embassy car. But without a chauffeur, he has to drive himself around town, and he doesn't bother raising the Somali flag on the vehicle to signify his diplomatic status. "Nowadays, with me behind the wheel, I just don't bother," he said. "It doesn't signify much."

Most of the time, though, even the sacrifice of such diplomatic pomp passes unnoticed, since with no work to do and no government to represent, Said has few places to go.

The Chinese government and the rest of the diplomatic community still treat him as a full ambassador, so he gets invitations to all official diplomatic functions. He goes to the airport to help greet foreign dignitaries and makes the rounds of embassy cocktail parties and dinners for countries' national day celebrations.

But he worries about showing up at too many functions, since he has no funds to throw any parties himself and does not want to be seen as a freeloader. "There is a feeling of lack of reciprocation on our part," he said.

There are still about 35 Somali students studying in China, and they occasionally need the ambassador's help in getting their passports updated or having documents authenticated. But besides those infrequent chores, Said has done basically nothing for the last 5 1/2 years, except bide his time reading and waiting -- and wondering if he will ever go home.

"A lot of time I spend worrying, seeking news, listening a lot to the national media, trying to find out what is happening," he said. "The rest is reading."

He said he reads any books and magazines he can get his hands on and has been using the time to brush up on his Arabic. He has little time for books about war or military affairs. "We don't have to read books to know about war," he said. All that reading "gets boring," he said, adding that his wife, especially, longs for family and friends back home.

He never got around to learning Chinese. He said he began taking courses when he first arrived here, but "I dropped it. There was no incentive, really."

Said's five children speak Chinese and have moved through the Chinese education system. The four oldest are grown now and studying in colleges elsewhere in China, on scholarships from the Chinese government, and the youngest, 16, studies here on a grant from Pakistan.

Said pins the blame for Somalia's predicament -- and his own -- on tribalism and the power-hungry faction leaders who continue fighting over the rubble of what was once their country.

"So far, that has been the main factor -- individual interests and playing on tribal interests, tribal mistrusts," he said. "The people who have the guns don't want to let go."

"I have no crystal ball, but we are hoping the factional leaders would realize there is no gain in perpetuating this situation," Said said.

But he also has strong criticism for the international community -- especially the United Nations and the United States -- which he says helped perpetuate the problem, first by refusing to recognize the interim administration of clan leader Ali Mahdi Mohamed, and then by staging a large-scale military intervention but withdrawing before the warring factions were disarmed.

After dictator Mohamed Siad Barre fled the capital in 1991, clan leaders meeting in Djibouti named Ali Mahdi as interim president, but he was soon challenged by his own powerful general, Mohamed Farah Aideed, who was killed earlier this year. The Djibouti conference, Said said, "was the closest we came to having a government after Siad Barre fell. But it was the U.N. and the U.S. that drew a red line through it and said Somalia has no government." Said is just hoping that some solution can be found soon, so he can end his long exile and eventually get a plane ticket out of China to go home.

"I'm here, waiting for the situation to stabilize," he said. "We cannot but hope." CAPTION: Said, still recognized as an ambassador by China, has little to do but read.