Hassan Gouled Aptidon, the first president of the Republic of Djibouti, is neither the guerrilla commander nor the revolutionary ideologue who might be expected to lead an African state out of colonialism and into independence.

He is a career politician who was in the right place at the right time when France decided to give independence to the Territory of the Afars and Issas, its last colony in Africa. For years France supported the minority Afar tribe, who dominated the territorial government while the majority Issas were relegated to the opposition. The Afars, as a minority oriented to Ethiopia, were mostly content to remain under French rule.

After the Marxist revolution in Ethiopia and the decision to grant independence to Djibouti, it became expendient for France to leave the pro-Somali Issas on top when the Tricolor was lowered for the last time.

Gouled, as leader of the African Popular League for Independence and the pro-Somali Issa majority, was the logical choice for the presidency and last week the single-chamber Djibouti National Assembly elected him by acclamation.

Gouled was born in Djibouti in 1916. Details of his boyhood and youth are sketchy and nobody here thought to prepare an official biography, but it is known that he had little formal schooling. Before turning to politics, he worked for a shipping company and is said to have acquired a few properties that provide him with a modest income.

Even his admirers describe him as coffee house politician, to whom his new world of air conditioned offices, appointment books and official protocol is utterly foreign.

He has had to give up his mornings of coffee, politics and intrigue at the Palmier en Zinc cafe.

In the 1950s he was the territory's elected senator in the French Senate in Paris, where he was aligned with the Gaullists. Then he was the territory's delegate in the French Chamber of Deputies. He returned to be minister of education in the territorial government under the pro-French Afar, Ali Aref, but broke with Aref in 1967 to come out for independence. He has spent the past 10 years working for that goal from a base in the territorial legislature.

He is Moslem who dresses casually and habitually wears a white cap over his gray hair. He is not known as an orator or charismatic leader and suffers from cataracts and fatigue, two disabilities which have already raised questions about the duration of his tenure. Gouled is married but has no children, according to the official information service.