Mr Montesinos was so influential he was known as the Andean Rasputin
Peru's former spy chief, Vladimiro Montesinos, is testifying in the trial of his one-time boss and former president of Peru, Alberto Fujimori, who is charged with human rights abuses and corruption.
Mr Montesinos, 63, is widely regarded as being the power behind the throne during Mr Fujimori's 10-year rule from 1990 to 2000.
The trial appearance is the first encounter between the two men since they fled Peru after the collapse of the government eight years ago.
Since then, Mr Montesinos has been jailed for drug-trafficking, gun-running and embezzlement, the longest sentence being 20 years.
But he could face more than 30 years behind bars if convicted of organising death squads in the 1990s.
Mr Montesinos has been accused of running a squad of army killers known as the Colina group, who slaughtered 25 civilians during Peru's war against leftist rebels. He has always denied involvement.
Prosecutors had hoped he would support their case that Mr Fujimori ordered the massacres. Mr Fujimori denies the charges, and in his early testimony Mr Montesinos said his former boss had no knowledge of the killings.
The Andean Rasputin?
Mr Montesinos began his career in the Peruvian armed forces in the early 1970s, but in 1977 was thrown out of the army and sentenced to a year in jail.
In the 1980s, he began a fresh career as a private lawyer in the Peruvian capital, Lima.
Emotions about Mr Montesinos ran high in Peru during the 1990s
Among his clients were several people charged with drug-trafficking offences, and others charged with tax evasion and fraud.
He is said to have met Alberto Fujimori when the latter was running for president for the first time in 1989-1990.
Mr Montesinos helped him over various charges of fraud, and is also credited with proving by means of a much-questioned birth certificate that Mr Fujimori had been born in Peru, and not in Japan - which would have excluded him from standing for the presidency.
Following Mr Fujimori's election, Mr Montesinos was put in charge of anti-drug operations carried out in conjunction with the United States.
He became known as the Andean Rasputin and was accountable to no-one but the president as they sought to put down rebels and cement the autocratic leader's grip on power.
Mr Montesinos' power increased after the 1992 closure of Congress, when Mr Fujimori took a stranglehold on all aspects of institutional life in Peru.
THE FUJIMORI ERA
1990: Wins a surprise victory at polls
1992: Dissolves Peru's congress with military backing, assuming greater control
1995: Restores congress and wins a second term
2000: Re-elected for third term amid vote-rigging claims
2000: Flees to Japan after Montesinos scandal breaks
2001-4: Japan refuses repeated attempts to extradite him
2005: Arrested on arrival in Chile on Peru's request
2007: Extradited to Peru
A shrewd operator, Mr Montesinos paid off his opponents, or exploited intelligence gleaned from his espionage network to manipulate them to do his bidding.
He was also closely involved in the successful campaign to root out the Sendero Luminoso (Shining Path) guerrilla movement.
In 1997 he was Mr Fujimori's close adviser during the hostage crisis at the Japanese ambassador's residence, which ended when all the members of the Tupac Amaru group were killed.
With secrets being his stock-in-trade, Mr Montesinos' activities as security adviser to the president and as secretly-appointed head of the Peruvian intelligence services were shrouded in mystery, down to his predilection for shady pre-dawn meetings with his boss.
What is clear is the extent of power he amassed during his time in Mr Fujimori's shadow. He helped appoint the new members of the armed forces' high command, and supreme court judges.
By the time the Fujimori government finally collapsed in 2000, many believed the spymaster's powers equalled those of the president.
"Fujimori and Montesinos co-governed Peru for the 10 years that Fujimori was its president," said Jo-Marie Burt, an academic who is observing the trial.
Ultimately, his shady work methods brought his downfall: a video of him bribing a member of an opposition party to switch his allegiance to Mr Fujimori before elections in 2000 was shot with one of his own hidden cameras.
Mr Fujimori denies charges of corruption and humans rights abuses
When the video became public knowledge, Mr Fujimori was forced not only to distance himself from Mr Montesinos but to announce that he was resigning and calling early elections to find a successor.
Mr Montesinos headed for exile in Panama, where he apparently had business interests.
But a month later, the Panamanian authorities decided they would not grant him asylum there, and he flew back to Peru, apparently to mount a direct challenge to Mr Fujimori. There were even fears he might try to instigate a military coup.
Mr Montesinos was arrested several months later in Venezuela while the former president remained in self-imposed exile in Japan for five years before he was arrested in Chile and extradited to Peru in 2007.
Before his court appearance, there was much speculation as to how the man who is said to have stolen a billion dollars from the Peruvian state would testify.
Observers say Mr Montesinos holds the key to incriminating the former president, and suggested that what was once a tight-knit bond between the men has unravelled since 2000 - they have traded barbed recriminations in the intervening years.
But many lawyers say Mr Montesinos may have made a pact of silence with Mr Fujimori in order to avoid mutual accusations.
His testimony that the former president had no knowledge of the death-squad killings suggests that pact may have lasted the test of time.