BISMARCK, N.D. -- North Dakota reached a $3 million deal to keep a rare fossil of a duckbilled dinosaur on display at the state's heritage centre, where it will serve as a cornerstone for the facility's $51 million expansion, officials said Tuesday.

The deal means the state can pursue fundraising from private sources, said State Historical Society Director Merl Paaverud. The $3 million must be raised within four years "or the deal is off," but Paaverud said he's optimistic that the fossil of Dakota the duckbilled dinosaur will stay there for good.

The 67 million-year-old Edmontosaurus with fossilized skin was found in 1999 by high school student Tyler Lyson on his uncle's ranch in North Dakota. Lyson, who went on to earn a doctorate in paleontology from Yale University, is now a postdoctoral researcher at the Smithsonian.

Lyson said in April that the money received for the fossil will be used to establish a Marmarth Research Foundation endowment fund "to be used to further vertebrate paleontology." Money would be used to "fund public digs, build up research collections, train students and further the advancement of paleontology," he said.

Researchers say Dakota is one of the more important dinosaur discoveries in recent times. It is one of only a few mummified dinosaurs in existence and may have the most and best-preserved skin, along with ligaments, tendons and possibly some internal organs. It has been the subject of a children's book and an adult book, and National Geographic television programs. It was featured at a 2009 dinosaur exhibit in Japan.

The dinosaur itself is enormous. Dakota's body, fossilized into stone, weighs about 8,500 pounds (3,855 kilograms), and two other portions, including a tail and an arm, bring the total to about 10,000 pounds (4,535 kilograms).

Dakota had been on loan to the North Dakota Heritage Center until July 2015.

The grand opening for the museum on the state capitol grounds is slated for Nov. 2, the 125th anniversary of North Dakota statehood.