Apple on Thursday overtook PetroChina Co. in terms of market value, making the Cupertino, Calif., company the second-largest company in the world.

As noted by Bloomberg, Apple is now valued at $265.8 billion, ahead of PetroChina's $265.5 billion. Apple is only behind Exxon-Mobil, the largest company in the world, which had a value of $313.3 billion Thursday.

The milestone was reached thanks to the fact that AAPL stock hit an all-time high, topping $290 at one point during the day. It ended the day up over $1, and the stock has increased a total of 37 percent this year.

In May, Apple's market cap surpassed Microsoft when it hit $222 billion, pushing it ahead of the Redmond, Wash., software giant. That accomplishment made Apple the second-largest American company, behind only Exxon-Mobil.