South Africa's top prison official defended the country's system of political detention today following the weekend death of a political detainee who was at least the 45th to die in police custody since 1963.

Minister of Police and Prisons Louis le Grange justified harsh conditions in South African detention centers, telling foreign correspondents here, "You won't get much information if you keep a detainee in a five-star hotel or with his friends."

He said the system's purpose was to extract information but denied that security police interrogation methods were responsible for all of the deaths since the system was introduced in 1963.

"Only six, seven or eight of these cases died from some form of assault," said le Grange, in what was the first implicit admission that any of the deaths had any connection to police brutality.

The latest detainee to die, a 21-year-old black man named Ernest Moabi Dipale, was found hanged yesterday in his cell at John Vorster Square, the police headquarters in Johannesburg. He had been detained since last Thursday.

Police say Dipale made a statement Saturday and was due to appear in court today to face several charges under the strict Internal Security Act, including an allegation that he aided the outlawed African National Congress, a black political organization.

Elizabeth Dipale, the dead man's mother, issued a statement saying she last saw her son on Friday when police took him with them to search her Soweto home. "He was perfectly normal," she said. "There was nothing about his behavior to suggest he was about to kill himself."

Family attorney Graham Dyson said there was an attempt to shoot Dipale last Wednesday, the day before his arrest.

Le Grange said the detention system was necessary because South Africa faced a tough security situation.

Every official inquiry into a prisoner death has absolved the security police of responsibility, with one exception--the case of an inquest verdict in the tribal homeland of Venda last month where a magistrate blamed local police for beating a political prisoner to death.

Le Grange gave the total number of detainee deaths as 45--not counting the seven that have occurred in tribal homelands that South Africa regards as independent--and said all the deaths, except for persons who died from assault, were from natural causes or suicide.

He said the figures were not exceptional by world standards.

"In some Western countries, the figures are much higher for ordinary criminal prisoners," le Grange said. "One should keep a sense of perspective and not point such a long finger at South Africa."

Le Grange also disputed charges that detainees are kept in solitary confinement. They are kept alone in cells, he said, but have contact with their interrogators and with officials who make regular visits.

Le Grange said he was not prepared to order a mandatory code of conduct for security police interrogators but was working on a voluntary policy statement that he would issue soon. The new system will not be legally binding, he said.