N'DJAMENA, Chad (AP) _ Thousands of Chadians turned out today to cheer President Hissene Habre and Zaire's President Mobutu Sese Seko at ceremonies to celebrate Chad's rout of the Libyan army.

Mobutu flew in from Kinshasa for six hours to take part in the celebration.

Chadians in tribal robes lined the streets dancing, singing patriotic songs and chanting slogans, as the two presidents drove past, standing side-by-side in an open limousine and waving to the crowd.

Groups of men and women in the blue-and-pink costumes of Habre's ruling party, the Union for National Independence and Revolution, sang a song specially composed for the event, including the lyrics: ''Welcome Mobutu, you are at home in N'Djamena, Chad and Zaire are a single country.''

A banner carried in the crowd said ''Moammar Gadhafi, would-be gravedigger of the Chadian people, your end is near.''

Detachments of Habre's desert fighters, who drove the Libyans from nearly all the northern desert they had occupied for five years, were lined up at the airport to welcome Mobutu.

But there was no gunfire as during the exuberant celebrations of the capture of the main Libyan base at Ouadi Doum on March 22. Three people were reported killed by ricochet bullets in the earlier festivities.

Nor did the Chadians parade any of the estimated 1,000 Libyan prisoners they took during their triumphant sweep across the desert. Chadian officials said earlier the prisoners would be displayed, but apparently changed their minds, perhaps fearing acts of violence by the population.

The celebrations centered on the city's main square facing the Roman Catholic cathedral that was destroyed in the civil war in 1980 and has since been rebuilt on a smaller scale.

A brisk desert wind blew clouds of dust across the city, at times obscuring the burning sun. Many of the guerrilla fighters from the desert wore their traditional ''Kadamoul'' turbans completely coveiring their faces against the sand.

The red, yellow and blue Chad flag and the green Zaire flag bearing a clenched fist fluttered around the square. Mobutu laid a wreath at the monument to the martyrs of Chad's 25-year civil war.

Mobutu wore his habitual leopardskin cap. Habre wore a white tribal robe and cap.

In Ouadi Doum, 600 miles to the northeast, Libyan planes continued attempts to destroy the sophisticated Soviet-made equipment they abandoned there, bombing from an altitude of 20,000 feet, Chadian sources said.

But the sources, insisting on anonymity, said the lull in the fighting continued on the ground, where the Libyans remain in control of the northern ridges of the volcanic Tibesti range and the ''Aouzou strip'' of Chadian territory they unilaterally annexed in 1973.

The Aouzou strip is a 45,000-square-mile band of potentially mineral-rich land in extreme northern Chad along the Chad-Libyan border. Its ownership has been in dispute since colonial times.