Briton Norman Kember and his Canadian colleagues James Loney and Harmeet Singh Sooden were freed after a multinational military raid acting on information provided by a detainee, the US military says.
No shots were fired in the mission
The rescue was completed without any shots being fired and with no kidnappers present, suggesting the operation was carefully planned and carried out.
Although rescue experts began work as soon as the three men were captured, the operation sped up in the last few weeks, BBC Security Correspondent Gordon Corera said.
A split occurred between the hostage takers motivated by politics and ideology versus those motivated by money.
When a money-motivated captor was himself captured by US security forces in Iraq on Wednesday night, rescuers were able to find the Baghdad location where the men were held.
"We moved to the location in western Baghdad that was reported for the location of the Christian Peacemaker Team," said Maj Gen Rick Lynch.
"We conducted an assault on the house and inside the house we found the three hostages, in good condition.
"There were no kidnappers there at the time. The three hostages were by themselves."
The hostages were bound, he said.
Hostage James Loney reportedly confirmed that one person had led the forces to where they were held.
In a telephone conversation with a friend, Mr Loney is said to have described the kidnappers as a criminal gang.
And, according to the Toronto Star, he told his brother of the moment he, Mr Sooden and Mr Kember were freed: "The door came crashing in and gentlemen with British accents basically unshackled him (Norman Kember) and escorted him out."
Gen Lynch described the men thought to be responsible as "a kidnapping cell that has been robust over the last several months in conducting these kind of kidnappings".
Multinational special forces, police negotiators and Iraqi intermediaries were understood to have taken part in the rescue, said the BBC's security correspondent Frank Gardner.
He described it was a textbook operation, our correspondent says.
The mission was spearheaded by British troops with the participation of forces from other coalition countries in Iraq.
"This was several weeks in the planning. It was an operation that was rolling, in a sense that it went on for some time," said the UK's Defence Secretary John Reid.
The multinational team included representatives from the Royal Canadian Mounted Police.
One of the hostages - American Tom Fox - was killed in captivity
"Other agencies from Canada - they did a terrific job with us as well as the Americans," UK Foreign Secretary Jack Straw said.
The foreign secretary said civilians had been involved in the operation "in the background".
Announcing the hostage release in London, Mr Straw said: "Mercifully no shots were fired."
This was clearly a major success for the British-led force, according to the BBC's defence correspondent Rob Watson.
Although foreign hostages have been freed in Iraq before, most were released as the result of secret negotiations, many involving the payment of ransom money.
But the body of the fourth member of the Christian Peacemaker Teams - US hostage Tom Fox - was found dumped in Baghdad nearly two weeks ago.
At least about 43 foreigners are still being held in Iraq.
And it is thought some 10 to 30 Iraqis are kidnapped every day - most of them for ransom.
Overall at least 280 foreigners have been taken hostage since the US-led invasion - about 50 of them have been killed by their captors.
But it does appear fewer foreigners are now being taken and fewer killed, our correspondent added.