Rows of puzzled spectators on the river banks watched the mammal navigate between boats and under bridges, while divers followed its movements, promising to help it if it became stranded.
"I saw it blow. It was a spout of water which sparkled in the air," witness Tom Howard-Vyne said. "It was an amazing sight."
It was the first time this type of whale — a northern bottlenose whale — has been sighted in the River Thames since the Natural History Museum began recording such sightings in 1913, museum zoologist Richard Sabian said.
At one point, the whale appeared to get stuck in shallow water in the Thames, and officials wearing yellow jackets could be seen running up and down the shoreline at low tide trying to push it back into deeper water.
Witnesses, including people riding in boats and walking along the banks of the river, spotted the whale near Parliament and said it appeared to be 20 feet long.
Howard-Vyne, who is a spokesman for London Eye, the large Ferris wheel on the southern bank, said he saw the mammal swim under Westminster Bridge, near Big Ben, and that a small boat was following it, apparently to shield it from other shipping in the river.
Northern bottlenose whales, which can grow up to 26 feet long, rarely swim in the nearby English Channel, said Sabian, who went to the scene where television networks provided live footage of the spectacle.
They are known as curious animals, readily approaching boats and normally traveling in groups, according to the Whale and Dolphin Conservation Society's Web site.