Aug 5 (Reuters) - U.S. rare earths miner MP Materials Corp said on Thursday it swung to a quarterly profit on rising prices for the minerals used to make high-end electronics and weaponry.

The company, which relies on China to process rare earth oxides from its California mine, reported second-quarter profit of $27.2 million, or 15 cents per share, compared to a net loss of $62.5 million, or 92 cents per share, in the year-ago quarter when it was a private company. (Reporting by Ernest Scheyder Editing by Chris Reese)