Sprawled across a spent volcano on the remote edge of the Great Victoria Desert in Western Australia, the Mount Weld mine seems a world away from the U.S.-China trade war.

But the dispute has been a lucrative one for Lynas Corp., Mount Weld's Australian owner. The mine boasts one of the world's richest deposits of rare earths, crucial components of everything from iPhones to weapons systems.

Hints this year by China that it could cut off rare earths exports to the United States as a trade war raged between the two countries sparked a U.S. scramble for new supplies — and sent Lynas shares soaring.