An ageing giant turtle revered as a symbol of Vietnam's independence struggle has won back her freedom back three months after being captured for medical treatment, an official said on Wednesday.

The animal, one of only four known of its kind, has been successfully treated at a special pond on an islet in central Hanoi's Hoan Kiem lake, said Le Xuan Rao, director of Hanoi's Department of Science and Technology.

"Her health condition is good, no more ulcers on the body," he said, a day after she was released back into the lake.

Local media earlier reported that the soft-shell turtle, which weighs about 169 kilograms (372 pounds), had been injured by fish hooks and small red-eared turtles which have appeared in the lake in recent years.

"Everything went smoothly," Rao said.

A conservationist has said the reptile is likely more than 100 years old, and is one of only four Rafetus swinhoei turtles known to be in existence. Two are in China and one lives in another Hanoi-area lake, he said.

But the animal's status in Vietnam stems from its history and its home in Hoan Kiem (Lake of the Returned Sword), rather than its rarity.

In a story that is taught to all Vietnamese school children, the 15th century rebel leader Le Loi used a magical sword to drive out Chinese invaders and founded the dynasty named after him.

Le Loi later became emperor and one day went boating on the lake. A turtle appeared, took his sacred sword and dived to the bottom, keeping the weapon safe for the next time Vietnam may have to defend its freedom, the story says.

Thousands of onlookers cheered the animal's capture in April after the feisty creature fled an earlier attempt to take it to the treatment pond.

Rao said Hoan Kiem's polluted waters are also being cleaned, to freshen up the turtle's environment.