Saudi Arabia kept its spot as China’s biggest oil supplier for the first seven months this year after pumping record output in July, even as Russia threatens to overtake the kingdom in their contest for sales to the world’s largest energy consumer. The biggest crude exporter shipped an average of 1.05 million barrels a day to China in the year through July 31, giving it a market share of 14 percent, according to Bloomberg calculations based on data that China’s General Administration of Customs published Wednesday. Russia’s share was 13.6 percent, the data show. Russia has gained ground in China this year, exceeding imports from Saudi Arabia in three months. “There’s a market-share battle going on mainly among the Middle East producers and Russia,” Olivier Jakob, managing director of Petromatrix, said by phone from Zug, Switzerland. “Rivals are making a big push into China.” Oil climbed more than 20 percent to enter a bull market last week amid speculation that supplier talks in September in Algiers may lead to action to stabilize the market. The world’s biggest producers are fighting for market share as prices are still at half the level of two years ago. Saudi Arabia pumped 10.67 million barrels a day on average in July, while Russia’s output was 11.01 million barrels a day, according to the Organization of Petroleum Exporting Countries. China bought more oil from Russia than from Saudi Arabia from March through May, according to the customs data. For all of last year, Russia’s share was 12.6 percent against Saudi Arabia’s 15.1 percent. Russia has gained ground on Saudi Arabia, in part, by selling crude on a spot basis to refineries not owned by China’s state oil companies, Jakob said. Those smaller refiners, known as teapots, have been allowed to import their own supplies in the past year. Russia sold 1.02 million barrels a day in the first seven months, the data show. Saudi Arabia, which has historically sold most of its crude under long-term contracts to large refiners, may try to sell more oil on a spot basis to win buyers in Asia, Jakob said. “Spot sales are a way of adapting to the competition,” Jakob said.