(CNN) - Prime Minister Gordon Brown paid a surprise visit to British troops in Afghanistan on Saturday, his office said.
He went to Camp Bastion, the main British base in Helmand province, as well as a police training college and a British forward operating base, or outpost, according to 10 Downing Street.
Brown's office told news outlets of his visit to Afghanistan while he was in the country but asked that it not be reported until he left. CNN complied with the request.
As Brown was making his visit, the Ministry of Defence announced a British soldier had been killed in Afghanistan on Friday.
The soldier died from wounds received as a result of an explosion while he was on foot patrol near Sangin, in Helmand Province, the ministry said in a news release. The death was not connected to Operation Moshtarak, the big push against the Taliban in the south of the country, according to the ministry.
The identity of the soldier has not been released. His family has been informed of his death, the ministry said.
Brown's trip to Afghanistan came less than 24 hours after he testified in London before the country's Iraq Inquiry, where he insisted British troops in Iraq had been given all the equipment they asked for.
Lord Charles Guthrie, a former chief of the British Defence Staff, rejected those claims in a newspaper column on Saturday.
"For Gordon Brown to say he has given the military all they asked for is not true," he wrote in the Daily Telegraph. "He cannot get away with saying, 'I gave them everything they asked for.' That is simply disingenuous."
Guthrie was the country's top military officer from 1997 to 2001. Brown was chancellor of the exchequer -- the man in charge of government spending -- from 1997 until 2007, when he became prime minister. The war in Afghanistan began in October 2001. The Iraq invasion took place in March 2003.
"The Ministry of Defense received the bare minimum from the chancellor, who wanted to give the military as little as he could get away with," wrote Guthrie, who joined the House of Lords, the upper house of the British legislature, after retiring from the military. He is not associated with a political party.
Brown spent much of Friday defending military spending allowances, which have come under harsh scrutiny in Britain. Earlier witnesses have said Brown, as chancellor in the time leading up to and after the Iraq invasion, did not allow the Ministry of Defence to spend as much as was needed.
Such limits would have restricted the military's ability to buy helicopters, body armor and weapons that would have subsequently been used in Afghanistan.
But Brown said that as chancellor, he never ruled out a military option on the basis of cost.
"I said that every single request that was made for [military] equipment had to be met, and every request was met, and at any point military commanders were able to ask for equipment that they needed, and I know of no occasion when they were turned down for it," he testified.
Geoff Hoon, defence secretary at the time of the 2003 invasion, testified that Brown forced cuts that limited military spending.
"We then had to look hard at our budget and make some rather difficult cuts in the future equipment program as a result," Hoon testified.
Brown had faced increasing pressure to testify before Britain holds general elections, widely expected to be held May 6. His Labour Party faces a tight race with the opposition Conservatives.
On the invasion of Iraq itself and the British role in it, Brown said Friday the decision to go to war "was the right decision and it was for the right reasons."
The inquiry, which began last year, is expected to be the most thorough investigation yet into decisions that led up to the war and governed Britain's involvement, analysts have said.
It is not a court of law, so the inquiry cannot find anyone criminally responsible or even apportion blame. But inquiry members will be able to judge the legality of the conflict.