Yannick Agnel, swimming the anchor leg for the French, reeled in Ryan Lochte on the last lap to win gold for France in three minutes, 09.93 seconds as France avenged their defeat to the United States in Beijing four years ago.
The Americans, who gambled and lost when they called up Lochte ahead of their sprint specialists, held on to take the silver medal after an exhilarating finish.
Russia got the bronze medal while Australia, who dubbed themselves a "weapon of mass destruction" after winning last year's world championship title, could only manage fourth.
Michael Phelps swam the second leg for the Americans and picked up the first silver medal of his Olympic career to lift his overall medal tally to 17, just one shy of the all-time record.
Four years ago, Phelps won an unprecedented eight golds in Beijing, including the men's relay when the U.S. famously came from behind to beat France on the last lap.
The U.S. coaches, influenced by Lochte's victory over eight times Phelps in the 400 metres individual medley, gave the new champion the anchor leg in the 4x100 metres relay.
Neither Lochte nor Phelps competed in the 100 freestyle at the U.S. championships but were still named in the quartet to contest the Olympic final on Sunday.
Lochte, also, does not regularly swim the 100 freestyle but his form on Saturday seemed to justify the gamble.
Instead Agnel swam the race of his life to touch first after clocking 46.74 seconds, a full second faster than the American.
The result was sweet revenge for the French after Jason Lezak caught Alain Bernard with his final stroke in Beijing to hand Phelps one of his titles.
"The 100 free?," shrugged Lochte. "I don't really swim it, I haven't swum the 100 free in a long time."
Cullen Jones, who swam the third leg for the Americans, said Lochte had swum a great race considering it was not one of his events.
"You can't really predict a 46.6," he said. "You really can't. Ryan was beating up on himself but once he heard his time he felt a lot better with it."
The pre-race propaganda was dominated by Australia's boast that they were "weapons of mass destruction" with James Magnussen as their missile.
Magnussen, Australia's first world 100 freestyle champion, has installed himself as the hot favourite for the Olympic title and in his first race of the Games on Sunday morning he showed why.
In the relay heats, Magnussen swam the first leg in 47.35 without exerting himself.
His team mates responded by helping the Australians to a year's best and ensuring they were placed in lane four for the final where they could theoretically control the race.
In the final the first sign that the plot was not going to unfold as the Australians had planned came when Magnussen could manage 48.03 only and national champion Nathan Adrian touched first for the Americans.
Phelps maintained the lead with the fastest U.S. leg of 47.15 and Jones kept the Americans ahead until Agnel's heroics in the final leg.
Australia were third at that stage but James Roberts, second fastest man in the world this year behind Magnussen, slipped to fourth behind Russia who captured the bronze.
"Our focus was Australia," added Jones. "But you can't overlook the French team, they have such talent. They are very fast in the freestyle."
The United States won the first seven editions of the race featuring the big beasts of the pool up to the 2000 Sydney Games.
After Gary Hall jnr had promised to play the Australians "like guitars", the hosts won the gold and responded with a triumphant exhibition of air guitar.
South Africa upset the Americans in Athens four years later and France threatened to do the same at the 2008 Beijing Games until Lezak came through in the last split second.
Earlier on, South African Cameron van der Burgh won Olympic gold in the men's 100m breaststroke final with a new world record time.
Van der Burgh charged through the first lap at breakneck speed then held off his challengers in the last length to reach the wall in 58.46 seconds.
His time trimmed 0.12 seconds off the previous world record of 58.58 set by Australia's Brenton Rickard at the 2009 world championships in Rome before polyurethane bodysuits were banned.
Australia's Christian Sprenger took the silver medal in 58.93 while American Brendan Hansen was third as an exhausted van der Burgh lay down on the lane ropes to celebrate his win.
He became the first South African man to win Olympic gold in an individual swimming event.
"Tonight, as I came in, I said to myself, 'a man can change his stars, you can write your own destiny tonight'. I had my chance and I took it," he said.
Van der Burgh later said he was looking up at the sky - remembering Norwegian rival and world champion Alexander Dale Oen, who died earlier this year of a heart attack.
"I know that he was probably laughing down at me, thinking 'how can you go that time?'"
Japan's Kosuke Kitajima, who won the breaststroke double at Athens in 2004 and Beijing four years later, was fifth, missing his chance to become the first man to win the same individual swimming title at three successive Olympics.
He still has the 200 breaststroke later in the programme.
"It was a really tough race. I needed to break the world record to win and to be honest I didn't have it in me," Kitajima said after the race, through a translator.
"When I was asked if I could swim 58.4 today, it was impossible... My personal best is 58.9 seconds, so I am disappointed not to reach the time.
"I have enjoyed the comeback process until now... I still have a chance in the 200. It is going to be a high-level race, I have to think about the 200 more seriously."
- Michael Phelps
- Ryan Lochte