The two neighbours undertook to share security information and to co-operate in enforcing immigration laws.
After the signing, South Africa's intelligence minister scolded a journalist who raised questions about Zimbabwe's record on human rights.
Details of the deal were not released but Zimbabwe's secret police is accused of torturing opposition activists.
South Africa is a key player in attempts to negotiate an end to Zimbabwe's political crisis.
President Thabo Mbeki has been criticised at home and abroad for not putting more pressure on President Robert Mugabe's government to end abuses.
"This week's historic meeting further consolidates a long-standing socio-political and economic relationship between our two countries," South African Intelligence Minister Ronnie Kasrils said at the signing of the agreement in Cape Town on Thursday.
Mr Kasrils apologised to his Zimbabwean counterpart, Didymus Mutasa, for the question.
"We have very strong ties with our neighbour and we are indebted to our neighbour for achieving freedom and liberty," Mr Kasrils said.
Mr Mutasa suggested praying for the journalist.
"Lord forgive him for he does not know what he is saying," Mr Mutasa said.
Numerous activists from the opposition Movement for Democratic Change have said they have been detained and assaulted by Zimbabwe's secret police - the Central Intelligence Organisation.
Thursday's agreement also provides for South Africa pilots and instructors to be trained in Zimbabwe.
Also on Thursday, Zimbabwean and international human rights groups called on the African Union to speak out against human rights abuses in Zimbabwe.
"The silence of African leaders on Zimbabwe represents a failure to honour their commitments to the human rights of ordinary Africans," said a statement from a human rights coalition that includes Amnesty International, Zimbabwe's Centre on Housing Rights and Evictions and Zimbabwe Lawyers or Human Rights.
"Hundreds of thousands of Zimbabweans have seen their homes demolished. Now desperate, displaced and homeless people are being denied the aid they so badly need - and forced evictions and demolitions continue to take place."
The UN says 700,000 people were affected by a Zimbabwe government clampdown on illegal housing and trading earlier this year.
Published: 2005/11/18 11:19:11 GMT
© BBC MMV
*This is the extent of South Africa's unholy alliance with Robert Mugabe's terror-regime.