A Tyrannosaurus skull smuggled into the US from the Gobi Desert — and auctioned off in Manhattan for $267,000 — will be returned to the Mongolian government under a deal brokered by federal prosecutors.

The 32-inch skull of the bataar dinosaur — believed to be Tyrannosaurus rex’s closest relative — is at least 65 million years old.

It was illegally shipped to the US in June 2006. Customs documents described it only as “fossil stone pieces,” authorities said.

After being told of its origins, the California buyer who purchased it in 2007 agreed to return it to its indigenous home, officials said.