Describing China as a friend to both Saudi Arabia and Iran, Chinese Foreign Minister Wang Yi said on Wednesday he hopes both countries can resolve their differences through talks, ahead of a visit by the Saudi king to China.
China has traditionally played little role in Middle East conflicts or diplomacy, despite its reliance on the region for oil. But it has been trying to get more involved in efforts to end Syria's six-year-old civil war, where Riyadh supports rebels battling President Bashar al-Assad.
Last year China also offered support for Yemen's government, which is backed by a Saudi-led Gulf Arab coalition in a war against the Iranian-aligned Houthi movement that controls much of the country.
China has had to tread a careful line, though, as it also has close relations with Iran. President Xi Jinping visited both Saudi Arabia and Iran in January last year.
Wang said China welcomes Saudi Arabia's King Salman's visit to China, which the foreign ministry said after Wang had spoken would take place from March 15-18.
"We hope that Saudi Arabia and Iran can resolve the problems that exist between them via equal and friendly consultations," Wang said at his annual news conference on the sidelines of parliament.
"China is friends with both Saudi Arabia and Iran. If there is a need, China is willing to play our necessary role," he added, without elaborating.
King Salman began a month-long Asian tour late February to build ties with the world's fastest growing importers of Saudi oil and promote investment opportunities, including the sale of a stake in its giant state firm Saudi Aramco.
(Reporting by Ben Blanchard; Editing by Michael Perry)