On June 30, 1864, with the Civil War in its fourth bloody year, President Abraham Lincoln made an unprecedented decision that's still paying big dividends a century and a half later.

Lincoln signed the Yosemite Grant Act, establishing what is now Yosemite National Park. The two-paragraph bill gave the granite-walled valley known as "Yo-Semite" and the nearby Mariposa Grove of giant sequoias to the state of California for "public use, resort, and recreation" that "shall be inalienable for all time."

In the mid-19th century, the federal government was giving away millions of acres in the West for railroads, mining, logging, grazing and homesteading. But this was different – visionary, even radical. For the first time, the federal government set aside land as open space for the purpose of conservation and recreation.

Lincoln's signature guaranteed public access to El Capitan, Half Dome, Yosemite Falls, the Grizzly Giant and other scenic wonders recognized around the world.

It probably doesn't come as a surprise to contemporary Californians that the state was a poor steward of the park. In 1906, the federal government reacquired the valley and Mariposa Grove, adding them to a national park encompassing Yosemite's high country that was created in 1890 at the urging of naturalist John Muir.

President Theodore Roosevelt, who camped at Glacier Point in 1903 and presided over the expansion three years later, described the valley in sacred terms. "It was like lying in a great solemn cathedral, far vaster and more beautiful than any built by the hand of man," he said.

Muir called it "by far the grandest of all the special temples of nature I was ever permitted to enter."

A century later, more than 4 million people visit Yosemite every year.

The challenge for the park's stewards is the same one faced by the 19th century conservationists who lobbied to create the park: Protecting it from the throngs of visitors drawn by its grandeur.

The National Park Service has worked in recent years to reduce the human footprint and create a more natural experience while still preserving recreational opportunities for visitors. It's a difficult balance to strike, but the Park Service has done a laudable job.

In the valley, after years of preparation, plans are in place to restore almost 200 acres of meadows and to add camping and parking sites. An ice rink will be removed, but bicycle and raft rentals will remain.

At the southern end of the park, parking lots and a gift shop will soon be removed from the entry to Mariposa Grove. Beginning in 2016, shuttle buses will bring visitors from Wawona, and there will be new trails through the 550-acre grove, which is home to 2,000-year-old trees.

These improvements will put Yosemite on a good path for its next 150 years.

Lincoln only saw Yosemite in photographs and paintings, but his decision in 1864 planted the seeds for the national park system. As Yosemite Superintendent Don Neubacher, who used to hold the same post at Point Reyes, noted earlier this year: "The preservation of parks and protected areas for future generations is now an institution in over 100 countries on six continents."