Humphrey Berkeley, a British politician who was hired by Transkei's prime minister as a political adviser last year, was severely beaten by Transkei security agents who abducted him from a hotel in Umtata and took him across the border into neighboring South Africa.

The surprise attack on Berkeley, who was right-hand man to Chief Kaiser Matanzima, Transkei's prime minister, appears to involve complex relationships between South Africa and the first black homeland it created as part of its policy of apartheid or racial separation.

Transkei has not been recognized as an independent state by any other country. Shortly after Berkeley's appointment, Matanzima broke off relations with South Africa in a move widely believed to be a ploy to bolster Transkei's case for diplomatic recognition.

It now appears that Berkeley, who served as a conservative member of Parliament and was once a leader of the British anti-apartheid movement, was engaged in behind-the-scene maneuvers aimed at bringing about a profound split between Transkei and its South African patron.

Berkeley's latest initiative in that direction -- his attempt to persuade Matanzima to bring Nigerian military advisers to Transkei -- appears to have contributed to Berkeley's political demise.

Berkeley, who is hospitalized near here, yesterday charged that Transkei security agents tried to kill him after they picked him up on "a warrant of arrest signed by the assistant commissioner of police."

He said he was taken from the hotel by two agents. About five miles from Umtata, Transkei's capital, the car stopped to be joined by a second car carrying four men.

"They began to beat me with sticks and belts with metal studs," Berkeley said.

Describing how he lay "in a pool of blood," Berkeley said, "they then put me in the boot [trunk] of a car and drove me across the border to about two miles from where I am now. I said my prayers in the boot."

"I said to them, 'I am not frightened of being killed, but you are doing a wicked thing.I want you to kneel down and I'll say a prayer for you.' They knelt down and I said, 'May God forgive you.' They then suddenly panicked and got into the car and made off.'"

Berkeley was walking along the road when he was picked up by a motorist, who took him to the police in the small South African town of Komga. From ther he was taken to a hospital.

Attempts by an aide to the Transkei prime minister to persuade Berkeley to return to Transkei were rebuffed.

"I would rather not go back to Transkei just now," he said.

A spokesman for the Komgo hospital said, "Mr. Berkeley's condition is fairly satisfactory. He is very tired. He is here for observation. He had to have a few stitches in the head."

There was confusion in Umtata Friday as senior police, including the Transkei commissioner of police and the chief of Transkei security police, denied all knowledge of the incident.

Chief George Matanzima, minister of police, denied knowledge of the affair, promising the punishment of those responsible.

"As minister of police," he said, "I have made it known that I want no violence."

The abduction and beating of Berkeley came within a few hours of the deportation of another Briton, J. S. Skinner, the dismissed managing director of the Transkei Development Corp. Both events took place following bitter attacks on Britain by Transkei's prime minister.