A black South African journalist who last year became the first foreigner to win an annual journalism award given by a Harvard University foundation has been jailed for 2 1/2 years for possessing a banned book.

The journalist, Joe Thloloe, spent 10 months in security police detention before his trial began earlier this month. Magistrate T. Kleynhans said Wednesday that he had taken into account this time in jail when deciding the sentence and also considered that Thloloe was a first-time offender.

The book that Thloloe had, "The New Road," is an 80-page volume published by the Pan Africanist Congress, an outlawed black nationalist organization committed to overthrowing white minority rule by force.

In a plea for leniency, Thloloe's lawyer, George Bizos, said that as a journalist, "Thloloe was naturally interested in the background of the African nationalist movement in South Africa." He also pointed out that Pan Africanist Congress literature is legally available in university and public libraries.

Magistrate Kleynhans, however, said that he regarded the offense as serious.

Thloloe worked for the Sowetan, a daily newspaper for blacks in Johannesburg. In April 1982 he won the Louis Lyons award, given annually by Harvard's Nieman Foundation, for "conscience and integrity in journalism."

James C. Thomson, curator of the Nieman Foundation, presented the award at a banquet in Harvard's Faculty Club to a colleague of Thloloe, Ameen Akhalwaya, who was there as a Nieman fellow.

Thomson noted in his presentation address that Thloloe had been detained for six months in 1976 and for two months between 1977 and 1978 without having been charged with any offense. Before Akhalwaya returned home with the award, Thloloe was detained again, on June 24. He has not been free since.

"I have still not been able to give him his certificate," Akhalwaya said in an interview Friday. "Now I shall have to wait another 2 1/2 years before I can do so."

Three other Africans who are not journalists, Sipho Ngcobo, 28, Bhlanganiso Sibanda, 26, and Steven Mzolo, 21, also were jailed for possessing banned congress documents. Ngcobo was jailed for 2 1/2 years, and the other two for three years. Thloloe and Mzolo are appealing.

Earlier last week all four were acquitted of charges under the stringent Terrorism and Internal Security Act. These charges related to accusations that they had furthered the aims of the banned congress and recruited youths to undergo military training outside the country.

Thloloe's imprisonment follows a series of recent actions against journalists in South Africa.

In early February two editors and a reporter appeared at a three-day secret trial on charges of prejudicing the interests and security of the state by publishing information about South African intelligence service activity in the Seychelles Islands at the time of a bungled coup attempt by a group of mercenaries in November 1981.

Rex Gibson, editor of the Rand Daily Mail, was fined $450; Tertius Myburg, editor of its sister paper, The Sunday Times, was fined $275; and reporter Eugene Hugo, who wrote for both, was fined $725.

On March 16, seven security policemen searched the Johannesburg offices of The Washington Post.

Two weeks later two police officers called on Harvey Tyson, editor of South Africa's biggest daily, The Star of Johannesburg, to warn him that they were investigating two possible charges under the country's press restriction laws.

One, under the Police Act, relates to an accusation that The Star reported a speech by Sally Hogan, sister of a former security police detainee, Barbara Hogan, that the police say contained untrue statements.

Under the Police Act, the onus is on newspapers to prove they took "reasonable steps" to establish that statements they publish about the police are true. In practice, that means submitting the statements to the police for their confirmation.

The other possible charge against Tyson is that The Star published a picture of a woman jailed after a major murder trial in a roundup of the year's events in its Dec. 31 issue. It is a breach of the Prisons Act to publish a picture of a prisoner more than 30 days after conviction, but such technical breaches usually have been overlooked before.

Meanwhile Theunissen Vosloo, former editor of a Johannesburg Afrikaans daily, Beeld, is on trial on a charge of being in contempt of court over a 1981 report about an exiled attorney.