Jessica Lynch became an icon of the war. An all-American heroine, the story of her capture by the Iraqis and her rescue by US special forces became one of the great patriotic moments of the conflict. It couldn't have happened at a more crucial moment, when the talk was of coalition forces bogged down, of a victory too slow in coming.

Her rescue will go down as one of the most stunning pieces of news management yet conceived. It provides a remarkable insight into the real influence of Hollywood producers on the Pentagon's media managers, and has produced a template from which America hopes to present its future wars.

But the American media tactics, culminating in the Lynch episode, infuriated the British, who were supposed to be working alongside them in Doha, Qatar. This Sunday, the BBC's Correspondent programme reveals the inside story of the rescue that may not have been as heroic as portrayed, and of divisions at the heart of the allies' media operation.

"In reality we had two different styles of news media management," says Group Captain Al Lockwood, the British army spokesman at central command. "I feel fortunate to have been part of the UK one."

In the early hours of April 2, correspondents in Doha were summoned from their beds to Centcom, the military and media nerve centre for the war. Jim Wilkinson, the White House's top figure there, had stayed up all night. "We had a situation where there was a lot of hot news," he recalls. "The president had been briefed, as had the secretary of defence."

The journalists rushed in, thinking Saddam had been captured. The story they were told instead has entered American folklore. Private Lynch, a 19-year-old clerk from Palestine, West Virginia, was a member of the US Army's 507th Ordnance Maintenance Company that took a wrong turning near Nassiriya and was ambushed. Nine of her US comrades were killed. Iraqi soldiers took Lynch to the local hospital, which was swarming with fedayeen, where he was held for eight days. That much is uncontested.

Releasing its five-minute film to the networks, the Pentagon claimed that Lynch had stab and bullet wounds, and that she had been slapped about on her hospital bed and interrogated. It was only thanks to a courageous Iraqi lawyer, Mohammed Odeh al-Rehaief, that she was saved. According to the Pentagon, Al-Rehaief risked his life to alert the Americans that Lynch was being held.

Just after midnight, Army Rangers and Navy Seals stormed the Nassiriya hospital. Their "daring" assault on enemy territory was captured by the military's night-vision camera. They were said to have come under fire, but they made it to Lynch and whisked her away by helicopter. That was the message beamed back to viewers within hours of the rescue.

Al-Rehaief was granted asylum barely two weeks after arriving in the US. He is now the toast of Washington, with a fat $500,000 (£309,000) book deal. Rescue in Nassiriya will be published in October. As for Lynch, her status as cult hero is stronger than ever. Internet auction sites have listed at least 10 Jessica Lynch items, ranging from an oil painting with an opening bid of $200 to a $5 "America Loves Jessica Lynch" fridge magnet. Trouble is that doctors now say she has no recollection of the whole episode and probably never will. Her memory loss means that "researchers" have been called in to fill in the gaps.

One story, two versions. The doctors in Nassiriya say they provided the best treatment they could for Lynch in the midst of war. She was assigned the only specialist bed in the hospital, and one of only two nurses on the floor. "I was like a mother to her and she was like a daughter,"says Khalida Shinah.

"We gave her three bottles of blood, two of them from the medical staff because there was no blood at this time,"said Dr Harith al-Houssona, who looked after her throughout her ordeal. "I examined her, I saw she had a broken arm, a broken thigh and a dislocated ankle. Then I did another examination. There was no [sign of] shooting, no bullet inside her body, no stab wound - only RTA, road traffic accident," he recalled. "They want to distort the picture. I don't know why they think there is some benefit in saying she has a bullet injury."

The doctors told us that the day before the special forces swooped on the hospital the Iraqi military had fled. Hassam Hamoud, a waiter at a local restaurant, said he saw the American advance party land in the town. He said the team's Arabic interpreter asked him where the hospital was. "He asked: 'Are there any Fedayeen over there?' and I said, 'No'." All the same, the next day "America's finest warriors" descended on the building.

"We heard the noise of helicopters," says Dr Anmar Uday. He says that they must have known there would be no resistance. "We were surprised. Why do this? There was no military, there were no soldiers in the hospital.

"It was like a Hollywood film. They cried, 'Go, go, go', with guns and blanks and the sound of explosions. They made a show - an action movie like Sylvester Stallone or Jackie Chan, with jumping and shouting, breaking down doors." All the time with the camera rolling. The Americans took no chances, restraining doctors and a patient who was handcuffed to a bed frame.

There was one more twist. Two days before the snatch squad arrived, Al-Houssona had arranged to deliver Jessica to the Americans in an ambulance. "I told her I will try and help you escape to the American Army but I will do this very secretly because I could lose my life." He put her in an ambulance and instructed the driver to go to the American checkpoint. When he was approaching it, the Americans opened fire. They fled just in time back to the hospital. The Americans had almost killed their prize catch.

A military cameraman had shot footage of the rescue. It was a race against time for the video to be edited. The video presentation was ready a few hours after the first brief announcement. When it was shown, General Vincent Brooks, the US spokesman in Doha, declared: "Some brave souls put their lives on the line to make this happen, loyal to a creed that they know that they'll never leave a fallen comrade."

None of the details that the doctors provided Correspondent with made it to the video or to any subsequent explanations or clarifications by US authorities. I asked the Pentagon spokesman in Washington, Bryan Whitman, to release the full tape of the rescue, rather than its edited version, to clear up any discrepancies. He declined. Whitman would not talk about what kind of Iraqi resistance the American forces faced. Nor would he comment on the injuries Lynch actually sustained. "I understand there is some conflicting information out there and in due time the full story will be told, I'm sure," he told me.

That American approach - to skim over the details - focusing instead on the broad message, led to tension behind the scenes with the British. Downing Street's man in Doha, Simon Wren, was furious that on the first few days of the war the Americans refused to give any information at Centcom. The British were put in the difficult position of having to fill in the gaps, off the record.

Towards the end of the conflict, Wren wrote a confidential five-page letter to Alastair Campbell complaining that the American briefers weren't up to the job. He described the Lynch presentation as embarrassing.

Wren yesterday described the Lynch incident as "hugely overblown" and symptomatic of a bigger problem. "The Americans never got out there and explained what was going on in the war," he said. "All they needed to be was open and honest. They were too vague, too scared of engaging with the media." He said US journalists "did not put them under pressure".

Wren, who had been seconded to the Ministry of Defence, said he tried on several occasions to persuade Wilkinson and Brooks to change tack. In London, Campbell did the same with the White House, to no avail. "The American media didn't put them under pressure so they were allowed to get away with it," Wren said. "They didn't feel they needed to change."

He acknowledged that the events surrounding the Lynch "rescue" had become a matter of "conjecture". But he added: "Either way, it was not the main news of the day. This was just one soldier, this was an add-on: human interest stuff. It completely overshadowed other events, things that were actually going on on the battlefield. It overshadowed the fact that the Americans found the bodies of her colleagues. What we wanted to give out was real-time news."

Lockwood told Correspondent:"Having lost the first skirmish, they (the Americans) had pretty much lost the war when it came to media support. Albeit things had got better and everything came to a conclusion quite rapidly, but to my feelings they lost their initial part of the campaign and never got on the front foot again," Lockwood said. "The media adviser we had here [Wren] was an expert in his field. His counterpart on the US side [Wilkinson] was evasive and was not around as much as he should have been when it came to talking to the media."

The American strategy was to concentrate on the visuals and to get a broad message out. Details - where helpful - followed behind. The key was to ensure the right television footage. The embedded reporters could do some of that. On other missions, the military used their own cameras, editing the film themselves and presenting it to broadcasters as ready-to-go pack ages. The Pentagon had been influenced by Hollywood producers of reality TV and action movies, notably Black Hawk Down.

Back in 2001, the man behind Black Hawk Down, Jerry Bruckheimer, had visited the Pentagon to pitch an idea. Bruckheimer and fellow producer Bertram van Munster, who masterminded the reality show Cops, suggested Profiles from the Front Line, a primetime television series following US forces in Afghanistan. They were after human stories told through the eyes of the soldiers. Van Munster's aim was to get close and personal. He said: "You can only get accepted by these people through chemistry. You have to have a bond with somebody. Only then will they let you in. What these guys are doing out there, these men and women, is just extraordinary. If you're a cheerleader of our point of view - that we deserve peace and that we deal with human dignity - then these guys are really going out on a limb and risking their own lives."

It was perfect reality TV, made with the active cooperation of Donald Rumsfeld and aired just before the Iraqi war. The Pentagon liked what it saw. "What Profiles does is given another in depth look at what forces are doing from the ground," says Whitman. "It provides a very human look at challenges that are presented when you are dealing in these very difficult situations." That approached was taken on and developed on the field of battle in Iraq.

The Pentagon has none of the British misgivings about its media operation. It is convinced that what worked with Jessica Lynch and with other episodes of this war will work even better in the future.

· War Spin, presented by John Kampfner and produced by Sandy Smith, is on BBC2 on Sunday at 7.15pm.