Montpelier, the splendid 18th-century Virginia home of James Madison about 30 miles northeast of Charlottesville, will be opened to the public as a shrine to the nation's fourth president if heirs of its late owner accede to the complicated conditions of her will.

The owner, Marion duPont Scott, died at age 89 on Sept. 4. In her will Scott donated $10 million to the National Trust for Historic Preservation to acquire, restore and maintain the mansion and a portion of the 2,600-acre estate.

"We at the National Trust are honored that Mrs. Scott would choose to put Montpelier under our stewardship," said Michael L. Ainslie, president of the National Trust. "It is clearly one of America's premier historic properties."

Scott, who lived on the estate for most of her life and used it to raise generations of champion steeplechase and thoroughbred horses, was not legally able to donate the property outright because of provisions in the will of her father, William duPont, who had purchased the estate in 1899. His will provided that the property go either to Scott's late brother, William duPont Jr., or in equal shares to his heirs if she did not have children, which she did not.

Thus Scott, who was married to actor Randolph Scott between 1936 and 1940, could only encourage her five nieces and nephews to donate or sell their shares in the estate to the National Trust. She also established a penalty in the will should these heirs not follow her wishes.

"She has requested that they either give or sell their interests to the National Trust, and has provided that if they don't choose to do so, they will forfeit their interest in a trust she has established," said V.R. Shackleford, co-executor of Scott's estate and her long-time attorney. Shackleford said he could not elaborate on the worth of this trust.

"We look forward to an amicable resolution of the terms of the will with Mrs. Scott's heirs and the executors of the estate," Ainslie said. "We share her desire to make Montpelier a monument to the presidency and life of James Madison."

The will did not specify precisely how much of the estate would become public property. Shackleford estimated that it would be "in the range of 500 to 600 acres." This would include the mansion, the main approach road and the gravesite of both James and Dolley Madison, located in a grove of trees about a quarter of a mile from the house.

The handsome plantation house, with its impressive Palladian portico, and its surroundings of elegant boxwood gardens, was built between 1755 and 1765 by James Madison, father of the president, and twice enlarged by his son. It played a crucial role in Madison's life.

"He thoroughly enjoyed both public life and the respites he always needed from it on his farm in Orange County, Va.," wrote Ralph Ketcham, author of "James Madison: A Biography." "In fact, his physical and psychic well-being seemed to depend on the satisfying balance he attained in this way."

Montpelier is the only home of the first five presidents still in private hands. Since 1934 the estate has been opened to the public only once a year, on the first Saturday in November, for a locally famous event called the Montpelier Races.

The mansion was originally a rather simple two-story house with a central hallway and two rooms on either side. In 1794, with advice from his friend Thomas Jefferson and workers from Jefferson's nearby Monticello, Madison added the portico with its four columns. Further work was done between 1809 and 1812 during his first term as president. Madison died at Montpelier in 1836. Dolley Madison sold the estate in 1844.

A headline for yesterday's story on the possible acquisition of James Madison's Virginia estate, Montpelier, by the National Trust for Historic Preservation implied that the trust is an agency of the federal government. The trust is a private, non-profit organization that receives some financial support from the National Park Service.