After 737 days living in the tree she dubbed Luna, 25-year-old Julia "Butterfly" Hill emerged sobbing and euphoric, to cheers from fellow environmentalists.
"Before anyone should ever be allowed to cut down trees like this, they should be mandated to live in it for two years," she said.
Ms Hill reached an agreement Friday with the Pacific Lumber company, and promised to climb down from her 18-storey-high perch, which is on company property near the small town of Stafford, 240 miles (390km) north of San Francisco.
The agreement will permanently protect the tree and a 200ft (61 metre) buffer zone around the tree from logging by the company.
In return, it requires Ms Hill and her partner in the agreement, a land trust known as Sanctuary Forest, to pay Pacific Lumber $50,000, which the company will then donate to Humboldt State University for forestry research programmes.
Harsh conditions
Ms Hill climbed the tree on 10 December 1997, vowing not to come down until Pacific Lumber agreed not to cut the tree down.
Over the past two years, she has endured everything from fierce winter storms to dry summer heat on a bed-sized perch about 180ft (55 metres) above the ground.
She spent her days reading, writing poetry and cooking vegetarian food with supplies hoisted aloft by supporters. She kept fit by climbing and used a bucket for personal hygiene.
She also became a celebrity, speaking to journalists via a mobile phone, writing newspaper commentaries and serving as an "in-tree" correspondent for a cable television programme on the environment.
Ms Hill said she was forced to act by the prospect of chain saws felling the tree, estimated to be between 600 and 1,000 years old.
In an official statement, Ms Hill praised Pacific Lumber for taking "an unprecedented, courageous step towards ending the timber wars" and pledged not to mount any more "tree-sits" on company property.